Image processing apparatus and method, recording medium, and program thereof

ABSTRACT

An image processing apparatus is provided for accurately recognizing an edge direction to perform an accurate image interpolation. A direction determining unit recognizes an edge direction of a remarked pixel and outputs it with information on its position to a reliability ranking unit and a directional distribution generating unit. A direction interpolating unit interpolates the remarked pixel in terms of directional interpolation. The reliability ranking unit determines whether or not a interpolated pixel is properly interpolated by the direction interpolating unit, ranks its reliability, and outputs a result to a directional distribution generating unit. This directional distribution generating unit generates directional distribution based on directional information and reliability information. A direction selecting unit recognizes an edge direction based on the directional distribution generated by the directional distribution generating unit.

CROSS REFERENCES TO RELATED APPLICATIONS

The present invention claims priority to its priority document No.2002-318276 filed in the Japanese Patent Office on Oct. 31, 2002, andU.S. patent application Ser. No. 10/694,781 filed Oct. 29, 2003, theentire contents of which being incorporated by reference herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an apparatus and a method, and arecording medium storing a computer executable program for imageprocessing, and particularly to an apparatus and a method, and arecording medium a computer executable program for image processing,which are applicable to a variety of sources such as still images andmoving images and allow redrawing of images with clear and natural edgesand texture in such a manner that it appeals to human visual sense,whereby making it possible to obtain high-resolution images of highquality.

2. Description of the Related Art

With an increase in opportunities to use digital image-based equipment(digital camera and camera-built-in type video tape recorder), there isa growing need for so-called digital zoom processing. Various methodshave been devised to increase the resolution of digital images. Many ofrelated art methods includes the following three methods. The firstmethod is a zero-order-hold interpolation using adjacent pixels as theyare. It is a simple interpolation method especially in terms ofhardware. The second method is a bilinear interpolation method insertingnew pixels both in the vertical and horizontal directions. Forinterpolation of adjacent pixels, it is considered as a very goodmethod. The third method is a B-spline interpolation method that isresistant to noise and does not produce mosaic patterns.

Also, edges are so enhanced that an interlace screen may be converted toa progressive screen. (for example, see Japanese Patent ApplicationLaid-open 2002-215121).

SUMMARY OF THE INVENTION

However, the first method can produces only a small effect with aparticularly high magnification resulting notorious noise that is knownas “mosaic pattern” in its magnified image. Further, edges are greatlydamaged, creating jaggies presenting nothing but gross eyesore. Thesecond method has a drawback in generating a fuzzy overall image, andthe resolution of the image would not be improved. Further, the thirdmethod produces a considerably blurred image, and, relatively speaking,its hardware is also complicated.

In order to solve the above-mentioned problem, it is proposed inJapanese Patent Application Laid-open No. 2001-201729 to interpolate apixel of interest from pixels on either direction of a diagonal linepassing therethrough, the pixel present above or under the line adjacentthereto or on the left or on the right column thereof so as to enlargean image so that edges in the image may be enhanced. The pixel ofinterest will be referred to as “remarked pixel” in the followingsections of the instant patent application. However, in interpolatingthe pixel, correlation between the pixel to be interpolated and a pixelthereon or thereunder or an adjacent pixel at the left or the rightthereof is obtained, whereas, if correlation cannot be identified, it isso arranged that linear interpolation between the pixels thereon andthereunder or at the left or the right thereof may be performed.Consequently, a correct interpolation of the pixel cannot necessarily begenerated. For example, in some cases, it is not possible to use a pixeldue to be interpolated between the pixels adjacent to the remarked pixelin a slant direction. Accordingly, there is a problem such that anenlarged, clear image may not generate as a result.

The present invention is made in view of situation described above, andis provided so as to enable suppression of an image error, which mayoccur at the time of a resolution change process, in an efficient andsimple manner with little computational processing load. The resolutionchange process may be performed on various types of still images andmotion images ranging from computer graphics to photographs.

A first image processing apparatus according to one embodiment of thepresent invention has: energy calculating means for calculating acentral pixel energy at a pixel position of interest; edge enhancementmeans for enhancing an edge based on the central pixel energy calculatedby the energy calculating means; edge direction detecting means fordetecting a direction of the edge enhanced by the edge enhancementmeans; linear interpolation means for interpolating a linearinterpolated pixel at the pixel position of interest by linearinterpolation; selected direction interpolating means for interpolatinga selected direction interpolated pixel in a selected direction at thepixel position of interest based on the edge direction detected by theedge direction detecting means, and compositing and interpolating meansfor interpolating a composition interpolated pixel by compositing thelinear interpolated pixel and the selected direction interpolated pixel.

The energy calculating means may be configured to calculate the centralpixel energy in the horizontal or vertical direction of a predeterminedpixel of the original image from pixel values of adjacent pixels presentin a proximity of the pixel.

The image processing apparatus may be configured to further include;maximum and minimum value detecting means for detecting a maximum valueand a minimum value of pixel values of pixels that are arrayed in thevertical direction or horizontal direction while having thepredetermined pixel at the center, the pixels being included in theadjacent pixels used by the energy calculating means; first comparingmeans for comparing the central pixel energy with the minimum value anda predetermined threshold value, the predetermined threshold value beinggreater than the minimum value and smaller than the maximum value; andtexture enhancing means for enhancing texture based on the central pixelenergy calculated by the energy calculating means. Furthermore, thetexture enhancing means may be configured to judges that thepredetermined pixel belongs to a texture area and a filter processing isperformed to enhance the texture if the central pixel energy is found tobe equal or greater than the minimum value and smaller than thethreshold according to a first comparison result of the first comparingmeans.

The filter processing may be configured to be one-dimensional filterprocessing that is performed by adding products that are obtained bymultiplying predetermined filter coefficients and corresponding pixels.

The predetermined filter coefficient may be configured to have a valuecorresponding to the central pixel energy.

The filter processing may be configured to be respectively carried outin the vertical direction and the horizontal direction of the originalimage.

The image processing apparatus may be configured to further include:maximum and minimum value detecting means for detecting a maximum valueand a minimum value of pixel values of pixels that are arrayed in thevertical direction or horizontal direction while having thepredetermined pixel at the center, the pixels being included in theadjacent pixels used by the energy calculating means; and secondcomparing means for comparing the central pixel energy with apredetermined threshold value and the maximum value, the predeterminedthreshold value being greater than the minimum value and smaller thanthe maximum value. Furthermore, the edge enhancing means judges that thepredetermined pixel belongs to an edge area, and a clipping processingis performed after execution of a filter processing to enhance the edgeif the central pixel energy is found to be equal or greater than theminimum value and smaller than the threshold according to a secondcomparison result of the second comparing means.

The filter processing may be configured to be one-dimensional filterprocessing that is performed by adding products that are obtained bymultiplying predetermined filter coefficients and corresponding pixels.

The predetermined filter coefficient may be configured to have a valuecorresponding to the central pixel energy.

The filter processing may be configured to be respectively carried outin the vertical direction and the horizontal direction of the originalimage.

The image processing apparatus may be configured to further includethird comparing means for comparing a pixel value of the pixelssubjected to the filter processing with the maximum value and theminimum value. Further, the clipping processing may be configured toreplace the pixel value of the pixel subjected to the filteringprocessing with the maximum value if the pixel value of the pixelsubjected to the filter processing is found to be greater than themaximum value according to a third comparison result of the thirdcomparing means. Further, the clipping processing may be configured toreplace the pixel value of the pixel subjected to the filteringprocessing with the minimum value if the pixel value of the pixelsubjected to the filter processing is found to be less than the minimumvalue according to the third comparison result of the third comparingmeans.

The edge direction detecting means may be configured to include: edgedirection interpolating means for interpolating an edge directioninterpolated pixel for the pixel position of interest; reliabilitydetecting means for detecting the reliability of the edge directioninterpolated pixel that is interpolated by the edge directioninterpolating means; and direction selecting means for selecting an edgedirection of a highest reliability based on detection results by thereliability detecting means.

The compositing and interpolating means may be configured tointerpolate, as the composite interpolated pixel, pixels of aprogressive image if the original image is an interlace image andenlarged twofold in the vertical direction.

A first image processing method according to one embodiment of thepresent invention includes: an energy calculating step for calculating acentral pixel energy at a pixel position of interest; an edgeenhancement step for enhancing an edge based on the central pixel energycalculated by the energy calculating step; an edge direction detectingstep for detecting a direction of the edge enhanced by the edgeenhancement step; a linear interpolation step for interpolating a linearinterpolated pixel at the pixel position of interest by linearinterpolation; a selected direction interpolating step for interpolatinga selected direction interpolated pixel in a selected direction at thepixel position of interest based on the edge direction detected by theedge direction detecting step, and a compositing and interpolating stepfor interpolating a composition interpolated pixel by compositing thelinear interpolated pixel and the selected direction interpolated pixel.

A program stored in a first recoding medium according to one embodimentof the present invention includes: an energy calculating step forcalculating a central pixel energy at a pixel position of interest; anedge enhancement step for enhancing an edge based on the central pixelenergy calculated by the energy calculating step; an edge directiondetecting step for detecting a direction of the edge enhanced by theedge enhancement step; a linear interpolation step for interpolating alinear interpolated pixel at the pixel position of interest by linearinterpolation; a selected direction interpolating step for interpolatinga selected direction interpolated pixel in a selected direction at thepixel position of interest based on the edge direction detected by theedge direction detecting step, and a compositing and interpolating stepfor interpolating a composition interpolated pixel by compositing thelinear interpolated pixel and the selected direction interpolated pixel.

A first program according to one embodiment of the present inventioncauses an computer to execute a process including: an energy calculatingstep for calculating a central pixel energy at a pixel position ofinterest; an edge enhancement step for enhancing an edge based on thecentral pixel energy calculated by the energy calculating step; an edgedirection detecting step for detecting a direction of the edge enhancedby the edge enhancement step; a linear interpolation step forinterpolating a linear interpolated pixel at the pixel position ofinterest by linear interpolation; a selected direction interpolatingstep for interpolating a selected direction interpolated pixel in aselected direction at the pixel position of interest based on the edgedirection detected by the edge direction detecting step, and acompositing and interpolating step for interpolating a compositioninterpolated pixel by compositing the linear interpolated pixel and theselected direction interpolated pixel.

A second image processing apparatus according to one embodiment of thepresent invention includes: direction detecting means for detecting adirection of an edge at a pixel position of interest; edge directioninterpolating means for interpolating an edge direction interpolatedpixel at the pixel position of interest based on the edge directiondetected by the direction detecting means; reliability detecting meansfor detecting a reliability of the edge direction interpolated pixelinterpolated by the edge direction detecting means; direction detectingmeans for detecting a direction of the edge of a highest reliabilitydetected by the reliability detecting means; linear interpolation meansfor interpolating a linear interpolated pixel at the pixel position ofinterest by linear interpolation; direction selecting interpolatingmeans for interpolating a selected direction interpolated pixel at thepixel position of interest based on the edge direction detected by thedirection detecting means, and compositing and interpolating means forinterpolating a composition interpolated pixel by compositing the linearinterpolated pixel and the selected direction interpolated pixel.

The image processing apparatus may be configured to further includeconsistency determining means for determining consistency of a localstructure of the edge direction interpolated pixel interpolated by theedge direction detecting means. Further, the reliability detecting meansmay be configured to detect the reliability of the edge directioninterpolated pixel by the edge direction interpolating means based on aresult of determination by the consistency determining means.

The image processing apparatus may be configured to further includedirectional distribution generating means for generating a directionaldistribution based on a relationship between the reliability and theedge direction. Further, the direction selecting means may be configuredto select an edge direction having a highest reliability based on thedirectional distribution.

The image processing apparatus may be configured to further includeweighting means for setting a weight of a direction selectinginterpolated pixel based on the reliability of a direction having thehighest reliability selected by the direction selecting means from thedirectional distribution. Further, the compositing and interpolatingmeans may be configured to interpolate a composite interpolated pixel byusing a coefficient corresponding to the weight set by the weightingmeans and by taking a linear sum of the linear interpolated pixel andthe selecting interpolated pixel.

The compositing and interpolating means may be configured tointerpolate, as the composite interpolated pixel, pixels of aprogressive image if the original image is an interlace image andenlarged twofold in the vertical direction.

A second image processing method according to one embodiment of thepresent invention includes: a direction detecting step for detecting adirection of an edge at a pixel position of interest; an edge directioninterpolating step for interpolating an edge direction interpolatedpixel at the pixel position of interest based on the edge directiondetected by the direction detecting step; a reliability detecting stepfor detecting a reliability of the edge direction interpolated pixelinterpolated by the edge direction detecting step; a direction detectingstep for detecting a direction of the edge of a highest reliabilitydetected by the reliability detecting step; a linear interpolation stepfor interpolating a linear interpolated pixel at the pixel position ofinterest by linear interpolation; a direction selecting interpolatingstep for interpolating a selected direction interpolated pixel at thepixel position of interest based on the edge direction detected by thedirection detecting step; and a compositing and interpolating step forinterpolating a composition interpolated pixel by compositing the linearinterpolated pixel and the selected direction interpolated pixel.

A program stored in a second recoding medium according to one embodimentof the present invention includes: a direction detecting step fordetecting a direction of an edge at a pixel position of interest; anedge direction interpolating step for interpolating an edge directioninterpolated pixel at the pixel position of interest based on the edgedirection detected by the direction detecting step; a reliabilitydetecting step for detecting a reliability of the edge directioninterpolated pixel interpolated by the edge direction detecting step; adirection detecting step for detecting a direction of the edge of ahighest reliability detected by the reliability detecting step; a linearinterpolation step for interpolating a linear interpolated pixel at thepixel position of interest by linear interpolation; a directionselecting interpolating step for interpolating a selected directioninterpolated pixel at the pixel position of interest based on the edgedirection detected by the direction detecting step, and a compositingand interpolating step for interpolating a composition interpolatedpixel by compositing the linear interpolated pixel and the selecteddirection interpolated pixel.

A second program according to one embodiment of the present inventionfor causing an computer to execute a processing that includes: adirection detecting step for detecting a direction of an edge at a pixelposition of interest; an edge direction interpolating step forinterpolating an edge direction interpolated pixel at the pixel positionof interest based on the edge direction detected by the directiondetecting step; a reliability detecting step for detecting a reliabilityof the edge direction interpolated pixel interpolated by the edgedirection detecting step; a direction detecting step for detecting adirection of the edge of a highest reliability detected by thereliability detecting step; a linear interpolation step forinterpolating a linear interpolated pixel at the pixel position ofinterest by linear interpolation; a direction selecting interpolatingstep for interpolating a selected direction interpolated pixel at thepixel position of interest based on the edge direction detected by thedirection detecting step, and a compositing and interpolating step forinterpolating a composition interpolated pixel by compositing the linearinterpolated pixel and the selected direction interpolated pixel.

In the first image processing apparatus, method and program according tothe present invention, the central pixel energy at a pixel position ofinterest is calculated, an edge is enhanced based on the calculatedcentral pixel energy, a direction of the enhanced edge is detected, thelinear interpolated pixel at the pixel position of interest isinterpolated by the linear interpolation based on the detected edgedirection, the selected direction interpolated pixel is interpolated atthe pixel position of interest based on the detected direction of theedge, and the linear interpolated pixel and the selected directioninterpolated pixel are composed to interpolate the compositioninterpolated pixel.

In the second image processing apparatus, method and program accordingto the present invention, the direction of an edge at a pixel positionof interest is detected, an edge direction interpolated pixel isinterpolated at the pixel position of interest based on the detectededge direction, reliability of the edge direction interpolated pixel isdetected, an edge direction of the highest reliability is selected fromthe detected reliability, the linear interpolated pixel is interpolatedat the pixel position of interest by the linear interpolation, theselected direction interpolated pixel at the pixel position of interestis interpolated based on the selected edge direction, and the linearinterpolated pixel and the selected direction interpolated pixel arecomposed to interpolate the composition interpolated pixel.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, features and advantages of the presentinvention will become more apparent from the following description ofthe presently preferred exemplary embodiment of the invention taken inconjunction with the accompanying drawing, in which:

FIG. 1 is a block diagram of a configuration of an image processingapparatus to which the present invention is applied;

FIG. 2 is a block diagram of configuration of an edge connectorprocessing unit of FIG. 1;

FIG. 3 is a block diagram of configuration of a high-speed verticalup-sampling processing unit of FIG. 1;

FIG. 4 is a block diagram of configuration of a vertical-directioninterpolating unit of FIG. 3;

FIG. 5 is a block diagram of configuration of a vertical up-samplingprocessing unit of FIG. 1;

FIG. 6 is a block diagram of configuration of a high-speed horizontalup-sampling processing unit of FIG. 1;

FIG. 7 is a block diagram of configuration of a horizontal up-samplingprocessing unit of FIG. 1;

FIG. 8 is a block diagram of configuration of a one-dimensional verticalimage refresh processing unit of FIG. 1;

FIG. 9 is a block diagram of configuration of a one-dimensionalhorizontal image refresh processing unit of FIG. 1;

FIG. 10 is a flowchart of assistance in explaining zoom processing of animage processing apparatus of FIG. 1;

FIG. 11 is a flowchart of assistance in explaining high-speed zoomprocessing at step S4 of FIG. 10;

FIG. 12 is a flowchart of assistance in explaining one-dimensionalvertical image refresh processing at a step 22 of FIG. 11;

FIG. 13 is a diagram of assistance in explaining the one-dimensionalvertical image refresh processing at the step 22 of FIG. 11;

FIG. 14 is a diagram of assistance in explaining the one-dimensionalvertical image refresh processing at the step 22 of FIG. 11;

FIG. 15 is a diagram of assistance in explaining one-dimensionalvertical image refresh processing at the step 22 of FIG. 11;

FIG. 16 is a flowchart of assistance in explaining one-dimensionalhorizontal image refresh processing at a step 23 of FIG. 11;

FIG. 17 is a diagram of assistance in explaining the one-dimensionalhorizontal image refresh processing at the step 23 of FIG. 11;

FIG. 18 is a diagram of assistance in explaining the one-dimensionalhorizontal image refresh processing at the step 23 of FIG. 11;

FIG. 19 is a diagram of assistance in explaining one-dimensionalhorizontal image refresh processing at the step 23 of FIG. 11;

FIG. 20 is a diagram of assistance in explaining high-speed verticalup-sampling processing;

FIG. 21 is a flowchart of assistance in explaining details of high-speedvertical up-sampling processing at a step 24 of FIG. 11;

FIG. 22 is a flowchart of assistance in explaining processing of a case1 at a step 72 of FIG. 21;

FIG. 23 is a flowchart of assistance in explaining the processing of thecase 1 in FIG. 22;

FIG. 24 is a flowchart of assistance in explaining the processing of acase 2 at the step 72 of FIG. 21;

FIG. 25 is a diagram of assistance in explaining calculation of localenergy at a step 92 of FIG. 24;

FIG. 26 is a diagram of assistance in explaining the processing ofcalculating an edge direction at a step 94 of FIG. 24;

FIG. 27 is a diagram of assistance in explaining the processing ofcalculating an edge direction at the step 94 of FIG. 24;

FIG. 28 is a diagram of assistance in explaining a remarked area;

FIG. 29 is a flowchart of assistance in explaining direction selectionprocessing at step S102 of FIG. 24.

FIG. 30 is a diagram of assistance in explaining examples of directionand reliability;

FIG. 31 is a diagram of assistance in explaining a defined edgedirection;

FIG. 32 is a diagram of assistance in explaining directionaldistribution;

FIG. 33 is a diagram of assistance in explaining the case 2 processingof FIG. 21;

FIG. 34 is a flowchart of assistance in explaining the processing of acase 3 at the step 72 of FIG. 21;

FIG. 35 is a diagram of assistance in explaining the case 3 processingof FIG. 34;

FIG. 36 is a diagram of assistance in explaining high-speed horizontalup-sampling at the step 24 of FIG. 11;

FIG. 37 is a flowchart of assistance in explaining details of high-speedhorizontal up-sampling processing at the step 24 of FIG. 11;

FIG. 38 is a flowchart of assistance in explaining the processing of thecase 1 at a step 152 of FIG. 37;

FIG. 39 is a diagram of assistance in explaining the case 1 processingof FIG. 37;

FIG. 40 is a flowchart of assistance in explaining the case 2 processingat the step 152 of FIG. 37;

FIG. 41 is a diagram of assistance in explaining the case 2 processingof FIG. 37;

FIG. 42 is a diagram of assistance in explaining a remarked pixel;

FIG. 43 is a flowchart of assistance in explaining direction selectionprocessing at step S182 of FIG. 40;

FIG. 44 is a diagram of assistance in explaining a defined edgedirection;

FIG. 45 is a diagram of assistance in explaining the case 2 processingof FIG. 37;

FIG. 46 is a flowchart of assistance in explaining the case 2 processingat the step 152 of FIG. 37;

FIG. 47 is a diagram of assistance in explaining the case 3 processingof FIG. 46;

FIG. 48 is a flowchart of assistance in explaining details of edgeconnector processing at a step 26 of FIG. 11;

FIG. 49 is a diagram of assistance in explaining details of edgeconnector processing at the step 26 of FIG. 11;

FIG. 50 is a diagram of assistance in explaining right diagonal energyand left diagonal energy at a step 242 and at a step 243 of FIG. 48;

FIG. 51 is a diagram of assistance in explaining the processing at astep 247 of FIG. 48 and at a step 252 of FIG. 49;

FIG. 52 is a flowchart of assistance in explaining zoom processing atstep S8 of FIG. 2;

FIG. 53 is a flowchart of assistance in explaining details of verticalup-sampling processing at a step 274 of FIG. 52;

FIG. 54 is a diagram of assistance in explaining vertical up-samplingprocessing in FIG. 53;

FIG. 55 is a flowchart of assistance in explaining horizontalup-sampling processing at a step 275 of FIG. 52;

FIG. 56 is a diagram of assistance in explaining horizontal up-samplingprocessing in FIG. 55;

FIG. 57 is a diagram of an image whose resolution is converted by aconventional resolution conversion system;

FIG. 58 is a diagram of an image whose resolution is converted by aresolution conversion system to which the present invention is applied;and

FIG. 59 is a block diagram of a hardware configuration of an imageprocessing apparatus in FIG. 1.

DETAILED DESCRIPTION OF THE EMBODIMENTS

FIG. 1 is a configuration of an image processing apparatus to which thepresent invention is applied. In the image processing apparatus 2, imagedata to be handled by an imaging input unit 1 is read from a recordingmedium or is inputted by receiving what is transmitted via a network,and then outputted to an image processing section 2. The imageprocessing section 2 changes (enlarges or reduces) resolution of animage inputted from the imaging input unit 1 and outputs it to animaging output unit 3. The imaging output unit 3 permits image datasupplied from the image processing section 2 to be shown in a displayunit, to be recorded in a recording medium, or to be transferred toother devices via a transmission medium.

In the image processing section 2, an edge connector processing unit 11is provided. The edge connector processing unit 11 executes processingto make an image edge thicker. Namely, a small size image is of lowresolution, having little reliable information so that enlarging it isdifficult. If the edge is as slender (thin) as single pixel, it isdifficult to detection an edge by using one of a high-speed verticalup-sampling processing unit 12, a vertical up-sampling processing unit13, a high-speed horizontal up-sampling processing unit 14, and ahorizontal up-sampling processing unit 15, thus making it difficult toperform interpolation processing along the edge direction accurately.Hence, pre-processing is carried out on the original image to facilitateedge detection. Such pre-processing to the extent of not destroyingimaging information is carried out on an image such as a computer iconor a word processor font that has a loose connection.

The high-speed vertical up-sampling processing unit 12 and the verticalup-sampling processing unit 13 carry out processing in the verticaldirection to increase respective resolution of the original image by ztimes. The high-speed vertical up-sampling processing unit 12 carriesout processing if the z value is greater than 1 and smaller than 2,while the vertical up-sampling processing unit 13 carries out processingif the z value is 2.

The high-speed horizontal up-sampling processing unit 14 and thehorizontal up-sampling processing unit 15 carry out processing in thehorizontal direction to increase respective resolutions of the originalimage by z times. The high-speed horizontal up-sampling processing unit14 carries out processing if the z value is greater than 1 and smallerthan 2, while the horizontal up-sampling processing unit 15 carries outprocessing if the z value is 2.

A linear reduction processing unit 16 carries out processing to reduce((Z<1)times) resolution of the original image.

A one-dimensional vertical image refresh processing unit 17 and aone-dimensional horizontal image refresh processing unit 18, whilemaking use of buffers 17 a and 18 a as necessary, respectively processimage data in the vertical direction or in the horizontal directionusing a one-dimensional filter and enhance the edge and texture with novisual incongruity. Namely, when image data is recorded in a recordingmedium, high-frequency components are suppressed due to physicalinfluence of the recording medium, so that a phenomenon of blurring anedge portion and a texture portion in an image may occur. Consequently,the one-dimensional vertical image refresh processing unit 17 and theone-dimensional horizontal image refresh processing unit 18 carry outcorresponding filter processing to obtain the central pixel energy ofeach pixel. Furthermore, from the central pixel energy value, it isdetermined whether the pixel belongs to the edge or the texture. In caseof belonging to the edge, clipping processing is further carried out tocontrol distortion caused by the filter processing.

Further, there are two kinds of filters respectively available asfilters to be used for the one-dimensional vertical image refreshprocessing unit 17 and the one-dimensional horizontal image refreshprocessing unit 18. A user may set up arbitrary ones if necessary. Oneof the two kinds of filters has a function that allows detailed controlof frequency region characteristic, while the other filter, though beingunable to control the frequency region characteristic in detail incomparison with the former filter, enables to decrease the processingvolume. These filters are similar except that different elements arerequired to make up the filter, and processing is also similar. In thefollowing description, the former filter is called Type A and the latterfilter is called Type B.

Next, detailed configuration of an edge connector 11 will be describedwith reference to a block diagram in FIG. 2. An edge connecting unit 101outputs detected edge information to a diagonal energy calculating unit102, thickens the edge based on the calculated left and right diagonalenergy, and connects the thickened edge.

Next, detailed configuration of a high-speed vertical up-samplingprocessing unit 12 will be described with reference to a block diagramin FIG. 2. The high-speed vertical up-sampling processing unit 112controls a vertical direction interpolating unit 112 so as to generatean interpolated pixel, generates an enlarged image in the verticaldirection, and outputs it.

Next, configuration of the vertical direction interpolating unit 112 ofFIG. 3 will be described with reference to a block diagram in FIG. 4.

A band limiting unit 121 consists of, for example, an LPF (Low PassFilter) and the like, and smoothes pixel values of respective pixels ofan inputted image, limits a band region, and outputs to a directionjudging unit 123 and an edge detecting unit 122.

The edge detecting unit 122 calculates local energy from an image signalsubjected to the band limiting, detects whether there is an edge or notbased on the detected value, and outputs to an slant weighting unit 129.

The direction judging unit 123 judges an edge direction and outputsinformation on the judged edge direction to a reliability ranking unit124 and a directional distribution generating unit 125, while outputtingpixel information to a direction interpolating unit 131. The reliabilityranking unit 124, based on inputted image information and edge directioninformation inputted from the direction judging unit 123, obtainsreliability of the edge direction information, and outputs it to thedirectional distribution generating unit 125. The directionalinterpolating unit 131, based on information from the direction judgingunit 123, interpolates a pixel using values of pixels disposed in thatdirection.

The directional distribution generating unit 125, based on the edgedirectional information inputted from the direction judging unit 123 andcorresponding reliability information from the reliability ranking unit124, generates directional distribution and supplies it to a directionselecting unit 126 and a slant weighting unit 129. The directionselecting unit 126 selects a direction of high reliability based on thedirectional distribution and outputs selected directional information toa slant interpolating unit 128. The slant weighting unit 129 calculatesa weight to be attached to a slant direction edge and outputs it to acompositing unit 130.

A linear interpolating unit 127 generates an interpolated pixel in theinputted image using pixels lying vertically above and below proximitythereof or pixels lying at the left and the right proximity thereof bythe use of linear interpolation, and output it to the compositing unit130. A slant interpolating unit 128 generates an interpolated pixel inthe inputted image using information on pixels adjacent to one anotherin such a way that the interpolated is sandwiched in a directioninputted from the direction selecting unit 126, and outputs theinterpolated pixel to the compositing unit 130. The compositing unit130, based on information on weighting in a slant direction inputtedfrom the slant weighting unit 129, respectively weights a pixel value ofthe interpolated pixel generated by the linear interpolation and a pixelvalue of the interpolated pixel generated by the slant interpolation inthe slant interpolating unit 128, and performs addition (a linear sumobtained with the weight as coefficients), thereby performing thecomposition and outputting the resultant pixel as the interpolatedpixel.

Next, configuration of the vertical up-sampling processing unit 13 willbe described with reference to a block diagram in FIG. 5. A verticalup-sampler 141 controls a vertical direction interpolating unit 142 togenerate and output an interpolated pixel. It should be noted thatconfiguration of the vertical direction interpolating unit 142 wasdescribed with reference to FIG. 4. Since it is similar to the verticalinterpolating unit of the high-speed vertical up-sampling processingunit 12 in FIG. 3, its description will be omitted.

Next, the high-speed horizontal up-sampling processing unit 14 will bedescribed with reference to a block diagram of FIG. 6. The high-speedhorizontal up-sampler 151 outputs information on adjacent pixels of apixel due to be interpolated to enable a horizontal directioninterpolating unit 152 to generate an interpolated pixel, generating andoutputting an image enlarged in the vertical direction. It should benoted that configuration of the horizontal direction interpolating unit152 uses a similar method as that of the vertical directioninterpolating unit 112 of the high-speed vertical up-sampling processingunit 12 in FIG. 3, which is described with reference to FIG. 4 toprocess pixels in the horizontal direction. Accordingly, its explanationwill omitted.

Next, configuration of the horizontal up-sampling processing unit 15will be described with reference to a block diagram of FIG. 7. Ahorizontal up-sampler 161 generates an interpolated pixel and outputs itto a vertical direction interpolating unit 162. It should be noted thatconfiguration of the vertical direction interpolating unit 162 uses asimilar method as that of the vertical interpolating unit 112 of thehigh-speed vertical up-sampling processing unit 12 in FIG. 3, which isdescribed with reference to FIG. 4. Accordingly, its description will beomitted.

Next, configuration of a one-dimensional vertical image refreshprocessing unit 17 will be described with reference to a block diagramin FIG. 8. From a plurality of pixels present in a vertical directionline corresponding to a remarked pixel of an inputted image, a centralpixel energy calculating unit 171 calculates and outputs its centralpixel energy to a judging and comparing unit 174. From a plurality ofpixels present in a vertical direction line corresponding to theremarked pixel of the inputted image, a vertical maximum/minimumdetecting unit 172 extracts and outputs a pixel value of its maximumvalue and a pixel value of its minimum value to the judging andcomparing unit 174.

A vertical filter processing unit 173 carries out filter processing on aplurality of pixels corresponding to the remarked pixel of the inputtedimage in the vertical direction, and outputs it to the judging andcomparing unit 174. From the central pixel energy value inputted fromthe central pixel energy calculating unit 171 and the value obtained bythe filter processing in the vertical direction-in the vertical filterprocessing-unit 173, the judging and comparing unit 174 determineswhether the pixel belongs to an edge or texture. In the case ofbelonging to the edge, it is compared with the maximum value or theminimum value that is inputted from the vertical maximum/minimumdetecting unit 172, and is subjected to clipping and outputted to thebuffer 17 a. The output unit 175 reads and outputs image signals storedin the buffer 17 a as necessary.

Next, configuration of a one-dimensional horizontal image refreshprocessing unit 18 will be described with reference to a block diagramin FIG. 9. From a plurality of pixels corresponding to the remarkedpixel of the inputted image, a central pixel energy calculating unit 181calculates and outputs its central pixel energy to a judging andcomparing unit 184. From a plurality of pixels present on a horizontaldirection line corresponding to the remarked pixel of the inputtedimage, a horizontal maximum value/minimum value detecting unit 182extracts and outputs a pixel value of its maximum value and a pixelvalue of its minimum value to the judging and comparing unit 184.

A horizontal filter processing unit 183 carries out filter processing ona plurality of pixels corresponding to the remarked pixel of theinputted image in the horizontal direction, and outputs to the judgingand comparing unit 184. From a central pixel energy value inputted fromthe central pixel energy calculating unit 181 and a value obtained bythe filter processing in the horizontal direction from the horizontalfilter processing unit 183, it is determined by the judging andcomparing unit 184 whether the pixel belongs to an edge or texture. Inthe case of belonging to the edge, it is compared with the maximum valueor the minimum value, which is inputted from the horizontal maximumvalue/minimum value detecting unit 182, and is subjected to clipping andoutputted to the buffer 18 a. The output unit 185 reads out and outputsimage signals stored in the buffer 18 a as necessary.

Next, zoom processing of the image processing section 2 will bedescribed with reference to a flowchart in FIG. 10. First, at step S1,the image processing section 2 sets a value of magnification Z as avariable z. Next, at step S2, the image processing section 2 determinesas to whether a value of the variable z is equal to 2 or larger. If itis smaller than 2, the process goes to step S3. If the value of thevariable z is greater than 1 and smaller than 2, the process proceeds onto step S4 where the image processing section 2 carries out a high-speedzoom processing. The high-speed zoom processing will be described indetail later with reference to a flowchart in FIG. 11. Subsequently, atstep S7, output display processing will be carried out.

If it is determined that the variable z is a value not between 1 and 2,the process goes to step S5 where it is determined whether the variablez is 0 or not. If the variable z is not 0 (if variable z is less than1), the process moves to step S6 where a linear reduction processing iscarried out by a typical linear reduction processing unit 16.Subsequently, at step S7, the output display processing is carried out.Namely, a generated image is shown on a display unit by an image outputsection 3.

On the other hand, if the variable z is determined to be 0 at the stepS5, since the processing to enlarge it has already been completed as aresult of performing the zoom processing for a predetermined number oftimes at the step S6, the process goes to the step S7 to carry outoutput display processing.

At the step S2, if the variable z is determined to be greater than 2,the process moves to step S8, and the image processing section 2 carriesout the zoom processing. This zoom processing will be described indetail later with reference to a flowchart in FIG. 50.

After the step S8, the process goes to step S9, and the image processingsection 2 divides the variable z by 2. Then, the process returns to thestep S2 where the process thereafter is carried out repeatedly.

Namely, if the variable z is greater than 2, the processing at the stepS8 is repeated for a predetermined number of times until the variablebecomes a value smaller than 2. If the variable z becomes smaller than 2and if the variable z is in between 1 and 2, the high-speed zoomprocessing is carried out at the step S4, whereas, if the variable z isless than 1, the standard linear reduction processing is carried out atthe step S6. The standard linear reduction processing may be realized byusing a bi-linear filter.

Next, the high-speed zoom processing at the step S4 will be describedwith reference to a flowchart in FIG. 11. First, at step S21, the imageprocessing section 2 determines whether or not a mode that is set by auser is an image mode. If the set mode is not the image mode (if animage subject to processing is an image of loose connection such as anicon or a font requiring the edge connector processing), the processmoves to step S26 where the edge connector processing is carried out.The edge connector processing will be described in detail later withreference to FIG. 46 and FIG. 47. It should be noted that in thisprocessing, the image of loose connection is pre-processed before animage of tight connection.

If the mode set at step S31 is determined to be the image mode (in thecase of an image subject to processing is an image of tight connection),after the processing at the step S26, the process goes to step S22 wherethe image processing section 2 carries out an one-dimensional verticalimage refresh processing.

At this point, referring to a flowchart in FIG. 12, the one-dimensionalvertical image refresh processing by the one-dimensional vertical imagerefresh processing unit 17 will be described.

At the step S31, it is determined if there is any pixel that is noprocessed yet in the image data inputted from the image input section 1.If it is determined that there is a pixel not processed, the processgoes to the step S32.

At the step S32, the central pixel energy calculating unit 171 retrievesan unprocessed pixel and calculates a vertical-direction central pixelenergy of the retrieved unprocessed pixel. For example, suppose imagedata shown in FIG. 13 is inputted and on each line in verticaldirections of y+1, y, and y−1 are disposed pixels from a to e, pixelsfrom f to j, and pixels from k to o. Then, vertical-direction centralpixel energy EV-h of area A (a range enclosed by a solid line) in theproximity of pixel h is given by:EV-h=|(b+c+d)−(l+m+n)|  (1)where b, c, d, l, m and n are pixel values of pixels b, c, d, l, m andn. Namely, the vertical-direction central pixel energy EV of theequation (1) is a sum of absolute values of differences between pixelvalues present on a line above the center that is positioned at theunprocessed pixel and pixel values present on a line thereunder.Consequently, if correlated pixels are present thereabove andthereunder, there is no appreciable discrepancy in the differences oftheir pixel values, so that the vertical-direction central pixel energybecomes small, while on the other hand, if pixels having no correlationare present thereabove and thereunder, there is often appreciablediscrepancy in the differences of their pixel values, resulting inincreasing the vertical-direction central pixel energy.

The central pixel energy calculating unit 171 obtains thevertical-direction central pixel energy EV-h of the unprocessed pixel bycalculating the above equation (1).

At step S33, the vertical maximum/minimum detecting unit 172 obtains amaximum value and a minimum value by comparing the pixel values of threepixels above and under the unprocessed pixel and the unprocessed pixelitself. Namely, for example, as shown in FIG. 13, if the unprocessedpixel is a pixel h, each pixel value of the pixels thereabove andthereunder and the unprocessed pixel itself c, h, and m (B area enclosedby a broken line in FIG. 17) is read, and, as shown in FIG. 18, themaximum value (c, h, and m) and the minimum value (c, h, and m) thereinare obtained.

At step S34, the judging and comparing unit 174 determines whether ornot the obtained vertical-direction central pixel energy EV-h is greaterthan the minimum value (c, h, and m) and smaller than the maximum value(c, h, and m); if it is determined to be greater than the minimum value(c, h, and m) and smaller than the maximum value (c, h, and m), that is,if its pixel is determined to be either an edge or texture, the processgoes to step S35.

At the step S35, the vertical filter processing unit 173 calculates acoefficient α constituting a vertical one-dimensional filter. Thecoefficient α is given by calculation shown in an equation (2).α=α0−(EV-h/EV-h-max)  (2)where α0 (1<α0≦2) is a value that may be arbitrary set by the user, andEV-h-max is the maximum value of the vertical-direction central pixelenergy EV-h. It should be noted that the maximum value EV-h-max of thevertical-direction pixel energy is different from the maximum value (c,h, and m) and represents the maximum value that can be calculated.

At step S36, the vertical filter processing unit 173 performs theone-dimensional vertical filter processing as shown in FIG. 14 of pixelsc, h, and m of B area as shown in FIG. 13. Namely, the one-dimensionalvertical filter may be what is shown as (1/2−α/2, α, 1/2−α/2) (1<α≦2).For example, if the filter is type A mentioned above, by means ofcalculation shown in an equation (3) below, a pixel value hV-filtersubjected to the filter processing may be given.hV-filter=c×(1/2−α/2)+h×α+m×(1/2−α/2)  (3)where the coefficient α is a value obtained by the above-mentionedprocessing at the step S35, and enables to adjust the degree ofenhancement of the edge or texture by the filter. Namely, thecoefficient α dynamically changes in accordance with the value of thevertical-direction central pixel energy EV-h. If the vertical-directioncentral pixel energy EV-h is small, the coefficient α becomes large,causing the one-dimensional vertical filter shown in FIG. 14 to actstrongly on the pixel h. Conversely, if the vertical-direction centralpixel energy EV-h is large, the coefficient α becomes small, causing theone-dimensional vertical filter shown in FIG. 14 to act weakly on thepixel h.

At step S37, the judging and comparing unit 174 carries out judgingprocessing, as shown in FIG. 14, to determine whether a pixel beingprocessed is an edge or texture. Namely, the vertical-direction centralpixel energy EV-h has a value close to the minimum value (c, h, and m)if it is at the texture, and has a value close to the maximum value (c,h, and m) if it is at the edge. In the present embodiment, a thresholdEV-s is set up in the middle between the maximum value (c, h, and m) andthe minimum value (c, h, and m). If the vertical-direction central pixelenergy EV-h is greater than the threshold EV-s, it is determined as anedge. Conversely, if the vertical-direction central pixel energy EV-h issmaller than the threshold EV-s, it is determined as texture. Forexample, if the vertical-central pixel energy EV-h is greater than thethreshold EV-s, the judging and comparing unit 174 determines that aremarked pixel being processed is an edge (determining that it is apixel present on a edge-indicated area), and the process goes to stepS38.

At the step S38, the judging and comparing unit 174, as shown in FIG.14, compares the pixel value hV-filter subjected to the filer processingwith the maximum value (c, h, and m) so as to determine whether or notthe pixel value hV-filter subjected to the filer processing is greaterthan the maximum value (c, h, and m). If it is determined to be greaterthan the maximum value (c, h, and m), at step S39, the judging andcomparing unit 174 substitutes the maximum value (c, h, and m) for thepixel value hV-filter.

At step S40, the judging and comparing unit 174 permits the buffer 17 ato store the pixel value substituted with the maximum value (c, h, andm) as the pixel value of the pixel h, and the process returns to thestep S31, so that similar processing is repeated until it is determinedthat the one-dimensional vertical edge enhancing processing is carriedout for all pixels.

At the step S34, if the vertical-direction central pixel energy EV isdetermined not to be greater than the minimum value (c, h, and m) andsmaller than the maximum value (c, h, and m), that is, if the pixel isdetermined to be neither edge nor texture, the process goes to the stepS40, so that the judging and comparing unit 174 permits the pixel valueof the pixel h to be stored as it is without the filter processing inthe buffer 17 a and the process returns to the step S31 to repeat theprocessing thereafter. Additionally, at the step S37, if thevertical-direction central pixel energy EV is determined to be smallerthan the threshold EV-s, the judging and comparing unit 174 determinesthat the remarked pixel being processed is texture, so that the processgoes to the step S40, that is, the judging and comparing unit 174permits the pixel value hV-filter subjected to the filter processing tobe stored in the buffer 17 a as the value of the pixel h.

At the step S38, if it is determined that the pixel value hV-filtersubjected to the filter processing is not greater than the maximum value(c, h, and m), the judging and comparing unit 174 compares, at step S41,the pixel value hV-filter subjected to the filer processing with theminimum value (c, h, and m) to determine whether or not the pixel valuehV-filter subjected to filer processing is equal to or smaller than theminimum value (c, h, and m). If it is determined to be equal to orsmaller than the minimum value (c, h, and m), the process goes to step S42.

At the step 42, the judging and comparing unit 174 substitutes theminimum value (c, h, and m) for the pixel value hV-filter, and the pixelvalue substituted with the minimum value (c, h, and m) is stored at thestep S40 in the buffer 17 a as the pixel value of the pixel h.

At the step S41, if it is determined that the pixel value hV-filtersubjected to the filter processing is neither equal to nor smaller thanthe minimum value (c, h, and m), the process goes to the step S40 wherethe judging and comparing unit 174 permits the pixel value hV-filtersubjected to the filter processing to be stored in the buffer 17 a asthe pixel value of the pixel h and the process returns to the step S31.

Namely, if, in the processing of the step S34, the vertical-directioncentral pixel energy EV-h is determined to be greater than the minimumvalue (c, h, and m) and smaller than the maximum value (c, h, and m),the maximum value (c, h, and m) and the minimum value (c, h, and m)obtained in the processing of the step S33 are recognized as the maximumvalue (c, h, and m) and the minimum value (c, h, and m) within a localrange as shown in FIG. 14. If the pixel value obtained by the filterprocessing in the processing of the step S36 is included in the range ofsuch minimum value and maximum value, further processing at the step S37is performed to determine whether it is an edge or texture. If it isdetermined as texture, the pixel value after the filter processing isstored as it is in the buffer 17 a. If it is determined as an edge andequal to or smaller than the minimum value (c, h, and m), the pixelvalue is considered as the minimum value, while if it is equal to orgreater than the maximum value (c, h, and m), the pixel value isconsidered as the maximum value (subjected to clipping) and stored inthe buffer 17 a. If, in the processing of the step S34, thevertical-direction central pixel energy EV-h is not greater than theminimum value (c, h, and m) nor smaller than the maximum value (c, h,and m) and if it is determined as neither edge nor texture, the originalpixel value without the filter processing is stored as it is in thebuffer 17 a.

It should be noted that the one-dimensional vertical filter is availablein two kinds as mentioned above, type A shown in FIG. 14 and type Bshown in FIG. 15. Namely, in type A, the filter processing is carriedout by calculation according to the equation (3), whereas, in type B,the following equation (4) is used for calculation.hV-filter (TypeB)=c×(1/4−α/2)+h×1/2+α+m×(1/4−α/2)  (4)

It should be pointed out that the coefficient α can be set by theequation (2) as in the case of type A. Since other processing is carriedout in a similar manner, description of the processing will be omitted.

At this point, we return to description of the processing in FIG. 11.

If the one-dimensional vertical image refresh processing in theprocessing of the step S22 is carried out, the step S23 follows forexecution of one-dimensional horizontal image refresh processing.

Now, the one-dimensional horizontal image refresh processing by theone-dimensional horizontal image refresh processing unit 18 will bedescribed with reference to a flowchart in FIG. 16.

At step S51, the one-dimensional horizontal image refresh processingunit 18 determines whether or not there is an unprocessed pixel fromimage data subjected to the one-dimensional vertical image refreshprocessing by the one-dimensional vertical image refresh processing unit17, and if it is determined that there is an unprocessed pixel, theprocess moves to step S52.

At the step S52, the central pixel energy calculating unit 181 retrievesthe unprocessed pixel and calculates vertical-direction central imageenergy of the retrieved unprocessed pixel. For example, suppose imagedata shown in FIG. 17 is inputted with pixels from a to e, pixels from fto j, and pixels from k to o are disposed on each line of y+1 and y−1 inthe vertical direction. Then, horizontal-direction central pixel energyEH-h of A area in the proximity of a pixel h is given by the followingequation.EH-h=|(d+i+n)−(b+g+1)|  (5)where d, i, n, b, g, and l are pixel values of pixels d, i, n, b, g, andl, Namely, the horizontal-direction central pixel energy EH of theequation (5) is a sum of absolute values of difference between pixelvalues present on a right line and pixel values present on a left linerelative to the center that is positioned at the unprocessed pixel.Consequently, if correlated pixels are present at the left and the rightthereof, there is no appreciable discrepancy in the differences of theirpixel values, so that the horizontal-direction central pixel energybecomes small, while on the other hand, if pixels having no correlationare present at the left and the right thereof, there is oftenappreciable discrepancy in the differences of their pixel values,resulting in increasing the horizontal-direction central pixel energy.

The central pixel energy calculating unit 181 obtains thehorizontal-direction central pixel energy EH-h of the unprocessed pixelby calculating the above equation (5).

At step S53, the horizontal maximum value/minimum value detecting unit182 obtains a maximum value and a minimum value by comparing the pixelvalues of three pixels at the left and the right including theunprocessed pixel. Namely, for example, as shown in FIG. 17, if theunprocessed pixel is the pixel h, each pixel value of the unprocessedpixel itself and its right and left pixels g, h, and i (B area enclosedby a broken line in FIG. 13) is read, and, as shown in FIG. 18, themaximum value (g, h, and i) and the minimum value (g, h, and i) thereofare obtained.

At step S54, the judging and comparing unit 184 determines whether ornot the obtained horizontal direction central pixel energy EH is greaterthan the minimum value (g, h, and i) and smaller than the maximum value(g, h, and i). If it is determined to be greater than the minimum value(g, h, and i) and smaller than the maximum value (g, h, and i), that is,if the pixel is determined to be either edge or texture, the processgoes to step S55.

At the step S55, the horizontal filter processing unit 183 calculates acoefficient α constituting a horizontal one-dimensional filter. As inthe above-mentioned equation (2), the coefficient α is given bycalculation shown in an equation (6).α=α0−(EH-h/EH-h-max)  (6)where α0 (1<α0≦2) is a value that may be arbitrary set by the user, andEH-h-max is the maximum value of the horizontal direction central pixelenergy EH-h. It should be noted that the maximum value EH-h-max of thehorizontal-direction pixel energy is different from the maximum value(g, h, and i) and represents the maximum value that can be calculated.

At step S56, the horizontal filter processing unit 183 performs theone-dimensional horizontal filter processing as shown in FIG. 18 forpixels g, h, and i of B area shown in FIG. 17. Namely, theone-dimensional horizontal filter may be what is shown as (1/2−α/2, α,1/2−α/2) (1<α≦2). For example, if the filter is type A mentioned above,by means of a calculation shown in an equation (7) below, a pixel valuehH-filter subjected to the filter processing may be given.hH-filter=g×(1/2−α/2)+h×α+i×(1/2−α/2)  (7)where the coefficient α is a value obtained by the above-mentionedprocessing at the step S55, enables to adjust the degree of enhancementof the edge or texture by filter. Namely, the coefficient α dynamicallychanges in accordance with the value of the horizontal-direction centralpixel energy EH-h. If the horizontal-direction central pixel energy EH-his small, the coefficient α becomes large, causing the one-dimensionalhorizontal filter shown in FIG. 18 to act strongly on the pixel h.Conversely, if the horizontal direction central pixel energy EH-h islarge, the coefficient α becomes small, causing the one-dimensionalhorizontal filter shown in FIG. 18 to act weakly on the pixel h.

At step S57, the judging and comparing unit 184 determines, as shown inFIG. 18, whether a pixel being processed is an edge or texture. Namely,if the horizontal-direction central pixel energy EH-h has a value closeto the minimum value (g, h, and i) if it is texture, and has a valueclose to the maximum value (g, h, and i) if it is edge. Hence, athreshold EH-s is set up in the middle between the maximum value (g, h,and i) and the minimum value (g, h, and i). If the horizontal-directioncentral pixel energy EH-h is greater than the threshold EH-s, it isdetermined as edge; conversely, if the horizontal direction centralpixel energy EH-h is smaller than the threshold EH-s, it is determinedas texture. For example, if the horizontal central pixel energy EH-h isgreater than the threshold EH-s, the judging and comparing unit 184determines that the remarked pixel being processed is an edge(determining that it is a pixel positioned in an edge-indicated area),and the process goes to step S58.

At the step S58, the judging and comparing unit 184, as shown in FIG.18, compares the pixel value hH-filter subjected to the filer processingwith the maximum value (g, h, and i) to determine whether or not thepixel value hH-filter subjected to filer-processing is equal to orgreater than the maximum value (g, h, and i). If it is determined to beequal to or greater than the maximum value (g, h, and i), at step S59,the judging and comparing unit 184 substitutes the maximum value (g, h,and i) for the pixel value hH-filter.

At step S60, the judging and comparing unit 184 permits the buffer 18 ato store the pixel value substituted with the maximum value (g, h, andi) as the pixel value of the pixel h, and the process returns to thestep S31, where the similar processing is repeated until it isdetermined that the one-dimensional vertical image refresh processing iscarried out for all pixels.

At the step S54, if the horizontal-direction central pixel energy EH isdetermined not to be greater than the minimum value (g, h, and i) andnot smaller than the maximum value (g, h, and i), that is, if the pixelis determined to be neither edge nor texture, the process goes to stepS40 where the judging and comparing unit 184 permits the pixel value ofthe pixel h to be stored as it is without filter processing in thebuffer 18 a, and the process returns to the step S51 to repeatprocessing thereafter. Additionally, at step S57, if thehorizontal-direction central pixel energy EH-h is determined to besmaller than the threshold EH-s, the one-dimensional image refreshprocessing unit 18 determines that the remarked pixel being processed istexture, and the process goes to the step S60. That is, the judging andcomparing unit 184 permits the pixel value hH-filter subjected to thefilter processing to be stored in the buffer 18 a as the value of thepixel h.

At step S58, if it is determined that the pixel value hh-filtersubjected to the filter processing is not equal to nor greater than themaximum value (g, h, and i), the judging and comparing unit 184compares, at step S61, the pixel value hH-filter subjected to the filerprocessing with the minimum value (g, h, and i) to determine whether ornot the pixel value hH-filter subjected to the filer processing is equalto or smaller than the minimum value (g, h, and i). If the pixel valuehH-filter subjected to filer processing is determined to be equal to orsmaller than the minimum value (g, h, and i), the process goes to stepS62.

At the step 62, the judging and comparing unit 184 substitutes theminimum value (g, h, and i) for the pixel value hH-filter, and at thestep S60, the pixel value substituted with the minimum value (g, h, andi) is stored in the buffer 18 a at the pixel value of the pixel h.

At the step S61, if it is determined that the pixel value hH-filtersubjected to the filter processing is not equal to nor smaller than theminimum value (g, h, and i), the process goes to the step S60 where thejudging and comparing unit 184 permits the pixel value hH-filtersubjected to the filter processing to be stored in the buffer 18 a asthe pixel value of the pixel h, and the process returns to the step S51.

Namely, if, in the processing of the step S54, the horizontal-directioncentral pixel energy EH is greater than the minimum value (g, h, and i)and smaller than the maximum value (g, h, and i), as shown in FIG. 16,the maximum value (g, h, and i) and the minimum value (g, h, and i)obtained in the processing of the step S53 are considered as the maximumvalue and the minimum value of the pixels g, h, and i within a localrange. If the pixel value obtained by the filter processing in theprocessing of step S56 is included in the range of such minimum valueand maximum value, further processing at the step S57 is performed todetermine whether it is an edge or texture. If it is determined astexture, the pixel value subjected to the filter processing is stored asit is in the buffer 18 a. If it is determined as an edge and equal to orsmaller than the minimum value (g, h, and i), the pixel value isconsidered as the minimum value while if it is equal to or greater thanthe maximum value (g, h, and i), the pixel value is considered as themaximum value (subjected to clipping), and the pixel value is stored inthe buffer 18 a. If, in the processing of the step S54, thehorizontal-direction central pixel energy EH is determined not to begreater than the minimum value (g, h, and i) and not smaller than themaximum value (g, h, and i), or if it is determined as neither edge nortexture, the original pixel value without the filter processing isstored in the buffer 18 a.

It should be noted that the one-dimensional horizontal filter isavailable in two types as mentioned above, type A shown in FIG. 18 andtype B shown in FIG. 19. Namely, in type A, the filter processing iscarried out by calculation according to the equation (7), whereas, intype B, the following equation (8) is used for calculation.hH-filter (TypeB)=g×(1/4−α/2)+h×1/2+α+i×(1/4−α/2)  (8)

It should be pointed out that the coefficient α can be set by theequation (2) as in the case of type A. Since other processing is carriedout in a similar manner, description of the processing will be omitted.

At this point, we return to description of the processing of FIG. 11.

If the one-dimensional horizontal image refresh processing at the stepS23 is carried out, the step S24 follows for execution of the high-speedvertical up-sampling processing. The high-speed vertical up-samplingprocessing, for example, as shown in FIG. 20, is a process to increasethe number of pixels of the original image inputted from the image inputsection 1 in the vertical direction. The high-speed vertical up-samplingprocessing is carried out by the high-speed vertical up-samplingprocessing unit 12.

Now, the high-speed vertical up-sampling processing will be describedwith reference to a flowchart in FIG. 21. A high-speed verticalup-sampler 111 first creates an H buffer 31 (to be explained later withFIG. 23) and a 2Y buffer 41 (to be explained later with FIG. 33) at stepS71. If the size of the original image (I_image) inputted from the imageinput section 1 is In_width×In_height, the size of the H buffer 31becomes In_width×(alpha_Z×In_height), where alpha_Z indicates amagnification for enlarging the original image in the verticaldirection. In the present case, because of the high-speed verticalup-sampling, the value is greater than 1 and smaller than 2 (the stepsS3 and S4).

The 2Y buffer 41 has the size of In_width×1. In the 2Y buffer 41, anpixel which is interpolated is temporarily stored.

Next, at step S72, the high-speed vertical up-sampling processing unit12 executes processing corresponding to a case 1 to a case 3.

The processing of the case 1 to the case 3 are process for generatinginterpolated data of a Y line of the H buffer 31. Which processing ofthe case 1 to the case 3 may be used to generate the interpolated dataof the Y line is determined as follows.

Namely, in the present embodiment, a virtual vertical twofold enlargedimage 2Y_image is assumed as an enlarged image of the original I_imageenlarged twofold in the vertical direction. Since an image to be storedin the H buffer 31 is an enlarge image of the original I_image enlargedby a factor of Z in the vertical direction. Assuming that a line in thevirtual vertical twofold enlarged image 2Y_image is 2Y_line and a linein the image to be stored in the H buffer 31 is Y, then, the followingproportional expression holds:Y:2Y_line=alpha_Z:2  (9)

From this expression, the following equation is obtained.2Y_line=Y×2/alpha_(—) Z  (10)

If a value 2Y_line calculated from the above equation (10) is an integerand an even number (2Y_line=2n, n being an integer), the interpolateddata of the Y line is generated by the processing of the case 1. If thevalue 2Y_line is an integer and an odd number (2Y_line=2n+1, n being aninteger), the interpolated data of the Y line is generated by theprocessing of the case 2. For other cases, that is, if the value 2Y_lineis a real number, the interpolated data of the Y line is generated bythe processing of the case 3.

In the case 1, the process shown in a flowchart of FIG. 22 is carriedout. Namely, in the case 1, the value of the line Y of the H buffer 31may be set so as to correspond to a predetermined line value(2Y_line/2=n) in the original I_image. Accordingly, at the step S81, thehigh-speed vertical up-sampler 111 copies a 2Y_line/2 line of theoriginal I_image, as it is, onto the Y line of the H buffer 31.

Processing in this case is schematically shown in FIG. 23. Namely, inthe case 1, since the value of the line Y of the H buffer 31 is equal tothe value of a line n of the original I_image. Accordingly, the n(=2Y_line/2) line of the original image may be copied, as it is, ontothe Y line of the H buffer 31.

Next, the processing in the case 2 will be described with reference to aflowchart of FIG. 24. In the case 2, since the value of (2n+2)/2 is notan integer, the value of the line Y of the H buffer 31 cannot be set soas to correspond to a predetermined line value in the original I_image.However, it may be set so as to correspond to a predetermined line value(2n+1) in the virtual vertical twofold enlarged image 2Y_image.

Accordingly, in this case, at step S91, the high-speed verticalup-sampler 11 extracts pixels on an upper line “up_line” and a lowerline “down_line” in the predetermined range (N pixel) of the originalI_image. The value of N is considered to be variable, therefore, thecentral coordinates of the up_line becomes (X+N/2,n) and the centralcoordinates of the down_line becomes (X+N/2,n+1)

Next, at step S92, the edge detecting unit 122 of the vertical directioninterpolating unit 112 calculates local energy E(N) based on a signalsubjected to band limiting by the band limiting unit 121 from thefollowing equation.E(N)=Σ(I=0, N−1)ABS(up_line(I)−down_line(N−I−1))   (11)

The calculation of the above-mentioned equation (11) shows thatsubtraction of pixels of the down_line disposed on diagonal lines fromrespective pixels of the up_line is performed and summation of itsabsolute value from I=0 to N−1.

FIG. 25 shows an example of calculation of local energy E(N). As showntherein, from the pixels of the up_line, and down_line, the pixel valuesof the pixels on the lower line are subtracted from the pixels disposedon the diagonal lines, and a sum of absolute values of differences isE(N). In the example of FIG. 25, a value (255) of a pixel Y1,4 issubtracted from a value (30) of a pixel Y0,0. Also, a pixel value (230)of a pixel Y1,3 is subtracted from a pixel value (150) of a pixel Y0,1.In a similar manner, a value (200) of a pixel Y1,2 is subtracted from avalue (150) of a pixel Y0,2, a pixel value (200) of a pixel Y1,1 issubtracted from a pixel value (200) of a pixel Y0,3, and a pixel value(30) of a pixel Y1,0 is subtracted from a pixel value (255) of a pixelY0,4. The sum of absolute values of respective differences becomes thelocal energy.

At step S93, the edge detecting unit 122 determines whether or not thelocal energy E(N) is greater than a predetermined threshold T. If thelocal energy E(N) is equal to or smaller than the threshold T, such areais considered as a flat, low energy area including no edges. In thiscase, it is not necessary to calculate the direction of potential edges.Accordingly, the process proceeds to step S94, and the direction judgingunit 123, based on the result of determination by the edge detectingunit 122, calculates an average value of an adjacent upper line centralpixel “up_line (N/2)” and an adjacent lower line central pixel“down_line (N/2)” and stores it as the pixel data for the coordinate(X+N/2,Y) of the H buffer 31, while, outputting directional informationindicating the vertical direction (direction L2 in FIG. 31 to beexplained later) to the reliability ranking unit 124 and the directionaldistribution generating unit 125. Further, the reliability ranking unit124 outputs 0, which indicates low reliability concerning thisparticular interpolated pixel, to the directional distributiongenerating unit 125. Namely, at the step S94, a typical linearinterpolation processing is carried out based on the following equation.H_buffer(X+N/2,Y)=0.5×(up_line(N/2)+down_line(N/2))   (12)

On the other hand, at the step S93, if the value of the local energyE(N) is determined to be greater than the threshold T, such area isconsidered as a high energy area including potential edges. In thiscase, at step S95, the direction judging unit 123 of thevertical-direction interpolating unit 112, based on an image signalsubjected to band limiting by the band limiting unit 121, carries outcalculation processing to test an edge direction and outputs informationon the detected direction to the reliability ranking unit 124 and thedirectional distribution generating unit 125, while, outputtinginformation on the detected pixels to the direction interpolating unit131. Specifically, the following calculation is repeated as long as xremains to be greater than −1 while x is being decremented from x=N−1.Energy=ABS(up_line(N−x−1)−down_line(x))  (13)

Of the energy values calculated by the above equation (13), the smallestvalue is selected, and the direction of diagonal lines to which the twopixels correspond is considered as the direction of a local edge.

FIG. 26 shows a specific example of this case. In this example, adifference between the pixel value (30) of the pixel Y0,1 and the pixelvalue (255) of the pixel 1,4, a difference between the pixel value (200)of the pixel Y0,3 and the pixel value (200) of the pixel 1,1, and adifference between the pixel value (255) of the pixel Y0,4 and the pixelvalue (30) of the pixel 1,0 are respectively calculated. And of theabsolute values of such values, the smallest value (in this example, adirection connecting the pixel Y0, 3 to the pixel Y1,1) is considered asa local edge direction.

FIG. 27 shows an example in which, from a difference between the threepixels on the up_line and the three pixels on the down_line held by theH buffer 31, a local edge direction is presumed. In an example of FIG.27, the value of N is set to be 3, whereas by setting a large value forthe N, more accurate detection of edges in more directions may be made.

If an edge direction is detected in the processing of step S95, furtherat step S96, the direction interpolating unit 131 carries outinterpolation processing (direction interpolation processing to becarried out) by using pixels of the detected edge direction. It meansthat this direction interpolation processing, based on the pixel valuesof two pixels corresponding to the edge direction, interpolates a pixelvalue of a pixel disposed-in between. Take an example of FIG. 26 wherean average value (200) of the pixel values of the pixel Y0,3 and thepixel Y1,1 is considered as the pixel value of a pixel between the twopixels.

Next, the process goes to step S97 where the reliability ranking unit124 carries out structural collector processing. The structuralcollector processing is processing to check consistency of a renewedlocal structure (a pixel generated by direction interpolation processingof the step S96 and the pixels thereon and thereunder) by analyzing arelationship between a pixel interpolated at the coordinates (X+N/2,Y)and its vertical proximity pixel, that is, between the coordinatesup_line(N/2) and the coordinates down_line(N/2).

Namely, in the structural collector processing, processing to subtractthe renewed pixel from the central pixel at the upper line is carriedout, and further processing to subtract the central pixel at the lowerline from the renewed pixel. Moreover, these two subtraction resultsthus obtained are multiplied to produce a value V(N/2) that indicates achange in the vertical direction. That is, calculation shown in thefollowing equation is performed at the step S96.V(N/2)=(up_line(N/2)−H-buffer(X+N/2, Y))×(H−buffer(X+N/2,Y)−down_line(N/2))  (14)

Next, at step S98, the reliability ranking unit 124 determines, based onthe result of calculation at the step S97, whether or not there isconsistency of the renewed local structure. This determination iscarried out based on whether or not a value V(N/2) calculated by theabove equation (14) is positive. If the value V(N/2) is positive,consistency is considered to be present, and, at step S99, thereliability ranking unit 124 sets the reliability of the interpolatedpixel to 1 and outputs it to the directional distribution generatingunit 125.

On the other hand, at the step S98, if the value V(N/2) is determined tobe negative, consistency is considered to be not present. Namely,judging of the local direction is incorrect, and the pixel valuegenerated at the step S96 is determined to be not proper. In this case,the reliability ranking unit 124 sets the reliability of theinterpolated pixel to 0, and outputs it to the directional distributiongenerating unit 125.

At step S101, it is determined whether or not all the pixels due to beinterpolated in the remarked area associated with the remarked pixel areinterpolated. If it is determined that all the pixels due to beinterpolated are not interpolated, the process returns to the step S91where the processing from the steps S91 to S101 is repeated until allpixels due to be interpolated are interpolated. If it is determined thatall the pixels due to be interpolated are interpolated, the process goesto step S102. The remarked area associated with the remarked pixelcorresponds to, for example, the interpolated pixels in the range of P(number of pixels)×M(lines) shown in FIG. 28. It should be noted that inFIG. 28, white circles stand for the remarked pixels (interpolatedpixels), black circles stand for pixels due to be interpolated, andcircles filled with grids stand for pixels of original images(originally present pixels). That all pixels due to be interpolated areinterpolated at the step S101 indicates all the pixels shown in blackcircles therein being fully interpolated, and the process moves to stepS102.

At the step S102, the direction selection processing is performed.

The direction selection processing will be described with reference to aflowchart in FIG. 29.

At step S111, the directional distribution generating unit 125 generatesa directional distribution. Namely, the directional distributiongenerating unit 125 generates the directional distribution from the edgedirections thus far inputted and information on reliability thereof.That is, as shown in FIG. 30, the directional distribution generatingunit 125 is inputted with the interpolating directions of respectiveinterpolated pixels corresponding to the arrangement of the interpolatedpixels and information on corresponding reliability.

It should be noted that in FIG. 28, there are shown interpolated pixelsof 5 pixels×3 lines with an arrangement of 15 corresponding interpolatedpixels at the left part of FIG. 30. Further, in the center of FIG. 30 isshown the interpolating direction of each interpolated pixel. Thesedirections of the interpolated pixels are, as shown in FIG. 31, numberscorresponding to the directions set so as to form a point symmetryaround the remarked pixel: a direction L0 is a direction on a straightline connecting an interpolated pixel at the upper left end to aninterpolated pixel at the lower right end; a direction L1 is a directionon a straight line connecting a second interpolated pixel from the upperleft end to a second interpolated pixel from the lower right end; adirection L2 is a direction on a straight line connecting aninterpolated pixel directly above to an interpolated pixel directlybelow; a direction L3 is a direction on a straight line connecting asecond interpolated pixel from the upper right end to a secondinterpolated pixel from the lower left end; and a direction L4 is adirection on a straight line connecting an interpolated pixel at theupper right end to an interpolated pixel at the lower left end.Furthermore, at the right part of FIG. 30 there is shown distribution ofreliability. A pixel whose reliability is reported as 1 is indicated byO, while a pixel whose reliability is reported as 0 is indicated by X.

Namely, according to FIG. 30, it is shown that the interpolatingdirections of interpolated pixels are 4, 3, 4, 4, and 3 from the upperleft; 3, 4, 4, 3, and 4 from the middle left; and 4, 4, 4, and 4 fromthe lower left. Also, reliability is shown as X, X, O, O, and X from theupper left; O, O, X, O, and O, from the middle left; and O, O, O, O, andX from the lower left.

As a result, the directional distribution generating unit 125 mayindicate, as shown in FIG. 32, the distribution by direction throughgenerating directional distribution in terms of a histogram indicatingthe number of O given to each direction. That is, in FIG. 32, thedirection L0 has zero O and zero X, the direction L1 has zero O and zeroX, the direction L2 has zero O and zero X, the direction L3 has two Oand two X, and the direction L4 has eight O and three X.

At step S112, the direction selecting unit 126 sets the followingBalance function from these directional distributions (interpolatingdirection and corresponding reliability distribution).

Namely, first, the direction selecting unit 126 sets the Balancefunction corresponding to the remarked pixel (X, Y) shown in thefollowing equation (15):Balance(X,Y)=Σ(I=(N+1)/2,N−1)(Population(LI))−Σ(I=0,(N−3)/2)(Population(LI))  (15)

Population (LI) is a function which shows the number of pixelsexpressing that there is reliability per direction LI, Σ indicatingobtaining a total sum, and (I=N+1)/2, N−1) or (I=0,(N−3)/2) indicating arange of I in which the total sum is calculated. N shows the number ofdirections set. Accordingly, in FIG. 31, there are directions from L0 toL4, hence, N=5.

At step S113, the direction selecting unit 126 determines whether or notthe Balance (X, Y) has a positive value. For example, if it isdetermined to have the positive value, from the direction LI defined inFIG. 31, a direction having the highest reliability over a range inwhich I is from 1=0 to (N−3)/2 is selected at the step S113.

Namely, the function defined in the equation (15) indicates on which ofthe left side and the right side lies a reliability tendency whenpositions of the upper tips of arrows indicating the direction arechecked if they are positioned to the left and right side of thedirection L2 while assuming the vertical direction L2 is set at thecenter. For example, a difference of respective sums of the reliabilityof the directions of a whole group of L0 and L1 as defined in FIG. 31and the reliability of a whole group of directions L3 and L4 is obtainedby the processing of step S114, and by comparing its magnitude, then, itis obtained toward which side of the left and the right it is slantedwith respect to the vertical direction, and the direction having thehighest reliability is selected from the group indicating thereliability tendency.

At step S116, the direction selecting unit 126 determines whether or notthere are a plurality of directions showing the highest reliability. Forexample, if there are a plurality of such directions, from a pluralityof the directions selected having the highest reliability, the directionclosest to the vertical direction is selected at step S117. On the otherhand, if there are no plurality of directions having the highestreliability at the step S116, the processing of the step S117 isskipped, whereby a direction selected by the processing of the step S114or the step S115 is selected as it is. That is, if there are directionshaving a similar degree of reliability, the direction closest to thevertical direction is selected.

At step S118, the direction selecting unit 126 determines whether or notexceptional conditions are applied. Namely, if any of the followingequations from (16) to (18) is satisfied, the direction selecting unit126 determines that it is an exceptional case, and selects the verticaldirection (direction L2 in FIG. 31) at step S119.Population_(—) LI(I=(N−1)/2)−Population(Best_Dir)≦−1  (16)Tendency(X,Y)<(PM)/3  (17)Total_Population(X,Y)<(PM)/3  (18)where Population_LI(I=(N−1)/2) is reliability in the vertical directionand Population(Best_Dir) is the reliability of the direction selected inthe processing of the steps from S111 to S117. Tendency (X,Y)(hereinafter may be referred to as “Tendency function”), if the Balancefunction is positive, shows Σ(I=(N+1)/2, N−1) (Population (LI)), whereasif it is negative, it shows Σ(I=0, (N−3)/2) (Population (LI)). Namely,that is the sum of reliability of the higher reliability groups if thedirection is divided into the left and right side groups of the verticaldirection. Total_Population(X,Y) is the sum of reliability if theremarked pixel is (X,Y).

Namely, if the equation (16) is satisfied, it means that the reliabilityin the vertical direction is higher than the reliability of thedirection selected in the processing from the steps S111 to S117,therefore, selection of the reliability in the vertical directionbecomes the selection of the higher reliability direction. Further, ifthe equation (17) and the equation (18) are satisfied, the sum of thereliability of the groups having higher reliability becomes smaller thana predetermined threshold of (PM)/3, so that the vertical direction isselected deciding that no pixels of comparable accuracy are available asa whole. Alternatively, a different value than the threshold of (PM)/3may also be set.

At step S120, the direction selecting unit 126 outputs information onthe selected direction to the slant interpolating unit 128.

Namely, in the case of FIG. 32, since the Balance function becomespositive (processing of the step S113), the direction L4 is selectedfrom the group of directions L3 and L4 as the direction having thehighest reliability. Further, there is no other direction having thesame reliability as the direction L4 and, furthermore, there are noexceptional conditions. Therefore, the direction L4 is hereby selected.

Now, we return to description of a flowchart in FIG. 24.

At step S103, the linear interpolating unit 127 obtains an average pixelvalue between the pixels present above and below in the verticaldirection relative to the remarked pixel as the linear interpolatedpixel, and outputs the average value to the compositing unit 130, while,at the same time, the slant interpolating unit 128 outputs to thecompositing unit the average pixel value between the pixels present inthe selected direction inputted by the direction selecting unit 126 asthe slant interpolated pixel value.

Namely, in the case of FIG. 32, since the direction L4 is selected, ifthe remarked pixel is present as in FIG. 31, the slant interpolatingunit 128 outputs the average pixel value between the pixel of the rightend on the upper line and the pixel on the left end of the lower line inFIG. 31 as the slant interpolated pixel value.

At step S104, the slant weighting unit 129 sets a weight,weight_slant(X,Y), in the slant direction of the remarked pixel (X,Y) asshown in the following equation (19), and outputs it to the compositingunit 130.weight_slant(X,Y)=ABS(Balance(X,Y)/Total_population(X,Y) (orweight_slant(X,Y)=ABS(Tendency(X,Y)/Total_population(X,Y))  (19)

Namely, the weight in the slant direction is set as a ratio of theabsolute value of the Balance function (or the Tendency function) to thetotal reliability.

At step S105, the compositing unit 130 calculates the following equation(20), weights the linear interpolated pixel inputted by the linearinterpolating unit 127 and the slant interpolated pixel for compositing,and outputs the results as the interpolated pixel. $\begin{matrix}{{{H\_ buffer}\left( {X,Y} \right)} = {{\left( {1 - {{weight\_ slant}\left( {X,Y} \right)}} \right) \times \left( {{h\text{-}{{buffer}\left( {X,{Y - 1}} \right)}} + {h\text{-}{{buffer}\left( {X,{Y + 1}} \right)}}} \right)} + {{weight\_ slant}\left( {X,Y} \right) \times \left( {{h\text{-}{{buffer}\left( {{X + {Best\_ Dir} - {\left( {N - 1} \right)/2}},{Y - 1}} \right)}} + {h\text{-}{{buffer}\left( {{{X\text{-}{Best\_ Dir}} - {\left( {N - 1} \right)/2}},{Y + 1}} \right)}}} \right.}}} & (20)\end{matrix}$where h-buffer(X,Y−1) and h-buffer(X,Y+1) are pixel values present aboveand under the remarked pixel, and h-buffer (X+Best_Dir−(N−1)/2,Y−1) andh-buffer (X-Best_Dir−(N−1)/2,Y+1) are pixels present on a diagonal linein the selected direction as viewed from the remarked pixel and presenton the upper line and the lower line.

In other words, because the weight on the linear interpolated pixel maybe expressed by (1-weight_slant(X,Y), the pixel value obtained by thelinear interpolation is multiplied by a weight relating to linearinterpolation (1-weight_slant(X,Y), and further multiplied by a weightrelating to the slant interpolated pixel weight_slant(X,Y), so that thecomposition interpolated pixel produced by the linear sum is set as thefinal interpolated pixel, thus making it possible to generate anaccurate interpolated pixel since the interpolation in the vertical andslant directions is composed in good balance with these weights.

Similar processing is repeatedly executed to obtain each pixel of theindividual unknown lines of the H buffer 31.

FIG. 33 shows the processing of the case 2 as shown by the flowchart inFIG. 24 in terms of relationship among the original I_image, the Hbuffer 31, the 2Y buffer 41, and the virtual vertical twofold enlargedimage 2Y_image. If the Y line of the H buffer 31 is in a predeterminedrelationship with the predetermined line “2Y line” of the virtualvertical twofold enlarged image 2Y_image, the direction interpolationprocessing is carried out based on the n line and n+1 line of theoriginal I_image, and data obtained is stored in the 2Y buffer 41. Thedata stored therein is copied (stored) in the Y line of the H buffer 31.

Next, the processing of the case 3 will be described with reference to aflowchart of FIG. 34. This refers to a case of 2n<2Y_line<2n+1 or2n−1<2Y_line<2n, that is, if the value of line Y in the H buffer 31 doesnot correspond to any of the line “2Y_line” of the virtual verticaltwofold enlarged image 2Y_image, nor correspond to any of the lines ofthe original I_image.

In this case, the high-speed vertical up-sampler 111 determines, at stepS131, whether or not the value of the 2Y_line is greater than 2n andsmaller than 2n+1. If the value of the 2Y line is greater than 2n andsmaller than 2n+1, the high-speed vertical up-sampler 111 generates theY line of the H buffer 31 from the 2n+1 line and the 2n line of thevirtual vertical twofold enlarged image 2Y_image.

Now, in this case, the high-speed vertical up-sampler 111 calculates, atstep S132, the 2n+1 line of the virtual vertical twofold enlarged image2Y_image by using an adjacent upper 2n line and a lower 2n+2 line (the nline and the n+1 line in the original I image) through processing fromthe steps S91 to S105 as shown in a case 2 flowchart in FIG. 24. Sincethe result of calculation at the step S132 may be used for calculatingthe next n+1 line calculation in the H buffer 31, it is stored in the 2Ybuffer 41 at step S133.

Further, at step S134, the high-speed vertical up-sampler 111 makes useof the 2n+1 line (the value stored in the 2Y buffer 41) calculated atthe step S132 and the 2n line of the virtual vertical twofold enlargedimage 2Y_image (n line of the original I image) to calculate the Y lineof the H buffer 31 using the following equation, and stores it in the Yline of the H buffer 31.H_buffer(X,Y)=(2Y_line−2n)×2Y-buffer(X)+(2n+1−2Y_line)×I_image(X,n)  (21)

In this way, in the processing from the steps S132 to S134, there isgenerated an image which is the original I_image enlarged twofold in thevertical direction, and from the image thus created and the originalI_image, there is generated an image enlarged by alpha_Z times.

On the other hand, if it is not determined at the step S131 that the 2Yline is greater than the 2n and smaller than the 2n+1 (that is, if it isdetermined that the 2Y line is greater than the 2n−1 and smaller thanthe 2n), the high-speed vertical up-sampler 111 generates the Y line ofthe H buffer 31 from the 2n−1 line and the 2n line of the virtualvertical twofold enlarged image 2Y_image. The 2n−1 line is calculatedwhen a preceding line in the H buffer 31 is obtained, and it may bealready stored in the 2Y buffer 41. Therefore, at step S135, thehigh-speed vertical up-sampler 111 determines whether or not the 2n−1line is already stored in the 2Y buffer 41, and if it is stored, the2n−1 line data is fetched from the 2Y buffer 41 at step S138.

If it is determined at the step S135 that the 2n−1 line data is notstored in the 2Y buffer 41 yet, the process goes to step S136 where thehigh-speed vertical up-sampler 111 calculates the 2n−1 line of thevirtual vertical twofold enlarged image 2Y_image, by using an upper 2n−2line and a lower 2n line (the n−1 line and the n line in the original Iimage) through processing from the steps S91 to S105 as shown in a case2 flowchart in FIG. 24. Since the value of the 2n−1 line calculated atthe step S136 may be used at a step 137 for performing the next Y+1 linecalculation in the H buffer 31, the high-speed vertical up-samplerstores it in the 2Y buffer 41.

After processing at the step S137 or at step S138, the process moves tostep S139, and the high-speed vertical up-sampler 111 makes use of the2n−1 line and the 2n line of the virtual vertical twofold enlarged image2Y_image, (the n line of the original I image) and interpolates the Yline of the H buffer 31 from the following equation and stores it in theY line of the H buffer 31.H-buffer(X,Y)=(2n−2Y_line)×2Y−buffer(X)+(2Y_line−(2n−1))×I_image(X,n)  (22)

This processing is carried out while performing an increment of the Xvalue from X=0 as long as the value remains to be smaller than In_width.

To obtain each pixel of the individual unknown lines of the H buffer 31,the similar processing is repeatedly carried out at coordinates (X+N/2,Y) that satisfies the conditions of (−1<X<In_width−N+1) and(−1<Y<alpha_Z×In_height−1).

In this way, in the processing of the case 3, the weightinginterpolation is carried out by using the 2n line and the 2n+1 line orthe 2n−1 line and the 2n line in the virtual vertical twofold enlargedimage 2Y_image.

A schematic representation of the processing to show the case 3 in FIG.34 as mentioned above is shown in FIG. 35. If the value of the 2Y_lineof the virtual vertical twofold enlarged image 2Y_image, whichcorresponds to the Y line of the H buffer 31, is greater than 2n andless than 2n+1, the 2n+1 line or 2n−1 line data is generated bydirection interpolation processing from the n line and n+1 line of thepredetermined original I_image, and stored in the 2Y buffer 41. Then,from the value stored in the 2Y buffer 41 and data on the 2n line of thevirtual vertical twofold enlarged image 2Y image, data in the Y line ofthe H buffer 31 is interpolated with the weighting.

Now, we return to the flowchart in FIG. 11. After the high-speedvertical up-sampling processing is carried out as mentioned above, theprocess proceeds to step S25 where the high-speed horizontal up-samplingprocessing is carried out. The high-speed horizontal up-samplingprocessing is processing to interpolate pixels in the horizontaldirection as FIG. 36 shows.

FIG. 37 shows details of the high-speed horizontal up-samplingprocessing. At step S151, the high-speed horizontal up-sampler 151creates a V buffer 51 (to be explained later with FIG. 39) and a 2×buffer 61 (to be explained later with FIG. 45). The V buffer 51 has asize of (alpha_Z×In_width)×(alpha_Z×In_height), and the 2× buffer 61 hasa size of 1×(alpha_Z×In_height). In the 2× buffer 61 is stored a line ofdata on the X coordinate (odd number coordinate) of a virtual horizontaltwofold enlarged image 2X_image.

At step S152, the processing corresponding to the cases from 1 to 3 iscarried out. Calculation of the following equation determines which caseof processing among the cases 1 to 3 is to be carried out.2X_column=X×2/alpha_(—) Z  (23)

If the value of the 2X column obtained by the above calculation is aninteger and an even number (2X_column=2n and n is an integer), it is setas the case 1. If the value of 2X_column obtained by the abovecalculation is an integer and an odd number (2X_column=2n+1 and n is aninteger), it is set as the case 2. If the value of the 2X column is areal number (other cases), it is set as the case 3.

In the case 1, processing shown in a flowchart in FIG. 38 is carriedout. This is a case where the 2X_column=2n column in the virtualhorizontal twofold enlarged image 2X_image corresponds to the2X_column/2=n column of the H buffer 31 that is already calculated. Inthis case, the high-speed horizontal up-sampling processing unit 14copies the 2X_column/2 column of the H buffer 31 onto a column X of theV buffer at step S161.

FIG. 39 is a schematic representation of the case 1 processing. If the2n column in the virtual horizontal twofold enlarged image 2X_imagecorresponds to n column of the V buffer 51, the n column of the H buffer31 is copied onto the column X of the V buffer 51.

FIG. 40 shows a flowchart of processing with respect to the V buffer 51of the case 2 at the step S152 of FIG. 37. This case is a case that canpermit the column X of the V buffer 51 to correspond to a predeterminedcolumn (2n+1) of the virtual horizontal twofold enlarged image 2X_image,but can not permit it to correspond to the value of a predeterminedcolumn of the H buffer 31.

In this case, at step S171, the high-speed horizontal up-sampler 151extracts a left_column as well as a right column within a predeterminedrange (N pixels) in the H buffer 31. The central coordinate of theleft_column is (n, Y+N/2) and the central coordinate of the rectangularright column is (n+1,Y+N/2).

Next, at step S172, the edge detecting unit 122 of the horizontaldirection interpolating unit 152, based on a signal subjected to bandlimiting by the band limiting unit 121, obtains local energy E(N) bysubtracting pixels of the right column disposed on the diagonal linefrom individual pixels of the left_column, and calculating a sum oftheir absolute values. Namely, the following equation is used forcalculation in this processing.E(N)=Σ(I=0,N−1)ABS(left_column(I)right_column(N−I−1))  (24)

Next, at step S173, the edge detecting unit 122 determines whether ornot the energy E(N) is greater than a predetermined threshold T. If theenergy E(N) is equal to or smaller than the threshold T, such area isconsidered as a flat and low-energy area including no edges. In thiscase, it is not necessary to calculate the direction of potential edges.Consequently, the process proceeds to step S174 where the directionjudging unit 123, based on the result of determination by the edgedetecting unit 122, permits the linear interpolating unit 127 tocalculate, as pixel data of coordinates (X+N/2, Y) in the V buffer 51,an average value of a central pixel of an adjacent left column“left_column(N/2)” and a central pixel of an adjacent right column“right_column(N/2)” for storage thereof in the coordinates (X+N/2, Y) ofthe V buffer 41, while, outputting directional information of thehorizontal direction (indicated by the L2 direction and to be explainedlater with FIG. 44) to the reliability ranking unit 124 and thedirectional distribution generating unit 125. Further, the reliabilityranking unit 124 outputs to the directional distribution generating unit125 a number 0 indicating low reliability regarding this interpolatedpixel.

Namely, as shown in the following equation, from the average value ofthe central pixel of the adjacent left_column(N/2) and the central pixelof the adjacent right_column(N/2), a pixel value of a new pixel (X+N/2,Y) is calculated (a standard linear interpolation processing isperformed).V-buffer(X+N/2,Y)=0.5×(left_column(N/2)+right_column(N/2))   (25)

At the step S173, if it is determined that the energy E(N) is greaterthan the threshold T, such area is considered as a high energy areapotentially including an edge. Hence, in this case, the process goes tostep S175 where the direction judging unit 123 of the horizontaldirection interpolating unit 152, based on the result of an image signalsubjected to band limiting by the band limiting unit 121, carries outcalculation processing to test the edge direction, and outputs detecteddirectional information to the reliability ranking unit 124 and thedirectional distribution generating unit 125, while, outputting detectedpixel information to the direction interpolating unit 131. Specifically,the following equation is used to carry out the edge directioncalculation processing.Energy=ABS(left_column(N−x−1)−right_column(x))  (26)

The above calculation performs a sequential decrement of x from x=N−1and continues such process as long as x is greater than −1. As shown inFIG. 41, specifically, the processing for subtracting pixels of theright column on the diagonal line from pixels of the left column isexecuted starting from the upper side of the right column.

A direction of a diagonal line of a pixel corresponding to the smallestvalue of the energy calculated is determined to be a local edgedirection. In FIG. 41, N=3 is used whereas determination of moredirections is possible by making the N value even greater. 2

In the processing of step S175, if the edge direction is determined,further at step S176, the direction interpolating unit 131 carries outinterpolation processing (direction interpolation processing is carriedout) by using pixels in the detected edge direction.

Next, at step S177, the reliability ranking unit 124 carries outstructural collector processing. Namely, by analyzing a relationshipamong a pixel interpolated at the coordinates (X,Y+N/2) in the V buffer51, a pixel at the coordinates left column(N/2) which is a proximitypixel in the vertical direction thereof, and a pixel at the rightcolumn(N/2), processing to check the consistency of the local structureis carried out. Consequently, according to the following equation, theinterpolated pixel is subtracted from the central pixel of the leftcolumn and the central pixel of the right column is subtracted from theinterpolated pixel to obtain two results of subtraction, whereas bymultiplying the two results of subtraction, a value H(N/2) indicating achange in the horizontal direction is calculated.H(N/2)=(left_column(N/2)−V-buffer(X+N/2,Y))×(V-buffer(X+N/2,Y)−right_column(N/2))  (27)

At step S178, it is determined, based on the value (H(N/2) calculated atthe step S177, whether or not there is consistency in the interpolatedlocal structure. Specifically, it is determined whether or not the valueH(N/2) is positive. If the value H(N/2) is positive, the pixel obtainedin the direction interpolation processing of the step S176 is consideredcorrect (consistent), and at step S179, the reliability of theinterpolated pixel is set to 1 and outputted to the directionaldistribution generating unit 125.

On the other hand, if the value H(N/2) is determined to be negative(inconsistent) at the step S178, that is, if it is determined that thepixel value generated by directional interpolation processing of thestep S176 is not proper, the process goes to step S180, and thereliability ranking unit 124 sets the reliability of the interpolatedpixel to 0 and outputs to the directional distribution generating unit125.

At step S181, it is determined whether or not all the pixels due to beinterpolated in the remarked area associated with the remarked pixel areinterpolated. If it is determined that all the pixels due to beinterpolated in the remarked area are not interpolated, the processingreturns to the step S171 where processing from the steps S171 to S181 isrepeated until all the pixels due to be interpolated are interpolated.If it is determined that all the pixels due to be interpolated in theremarked area are interpolated at the step S181, the process goes tostep S182. In this context, the remarked area associated with theremarked pixel means, for example, pixels due to be interpolated in arange of M(pixels)×P(lines) as shown in FIG. 4. It should be noted thatin FIG. 42, a white circle stands for a remarked pixel (interpolatedpixel), a black circle stands for an interpolated pixel, and a circlefilled with grids stands for a pixel of an original image (originallypresent pixel). That all pixels due to be interpolated are interpolatedat the step S181 indicates all the pixels shown in black circles thereinbeing all interpolated.

The direction selection processing will be executed at step S182.

Now, the direction selection processing will be described with referenceto a flowchart in FIG. 43.

At step S201, the directional distribution generating unit 125 generatesdirectional distribution. Namely, the directional distributiongenerating unit 125 generates directional distribution from the edgedirectiona thus far selected and information on reliability thereof.

It should be noted that the directional distribution is basicallysimilar to what is described with reference to FIG. 28, FIG. 30 to FIG.32, except for inversion of a relationship between the horizontaldirection and the vertical direction.

At step S202, the direction selecting unit 126 sets the followingBalance function from these directional distributions (distribution ofreliability corresponding to the interpolating directions)

Namely, first, the direction selecting unit 126 sets the Balancefunction corresponding to a remarked pixel (X,Y) shown in the followingequation (28).Balance(X,Y)=Σ(I=(N+1)/2,N−1)(Population(LI))−Σ(I=0,(N−3)/2)(Population(LI))  (28)

Population (LI) is a function which indicates the number of pixelshaving reliability per a direction LI, Σ indicates obtaining of a totalsum, and (I=N+1)/2, N−1) or (I=0,(N−3)/2) indicates a range of I forobtaining the total sum. N shows the number of directions set.

At step S203, the direction selecting unit 126 determines whether or notthe Balance (X,Y) has a positive value. For example, if it is determinedto have the positive value, a direction having the highest reliabilityover a range in which I is ranging from I=(N+1)/2 to N−1 is selected atstep S204 from the direction LI defined in FIG. 44. It should be notedthat this relationship is an inversion of the definition of directionsshown in FIG. 31 with respect to the relationship between the horizontaldirection and the vertical direction, and they are basically similar.

On the other hand, if it is determined to have no positive value at thestep S203, from the direction LI defined in FIG. 44, a direction havingthe highest reliability over a range in which I is ranging from I=0 to(N−3)/2 is selected.

Namely, the function defined in the equation (28) indicates on which ofthe upside and the downside lies a reliability tendency if thehorizontal direction is set as its center and positions of the rightends of arrows indicating the directions in the drawing are divided to aupper side and a lower side of the direction L2, For example, adifference of respective sums of the reliability of a whole group of thedirections L0 and L1 as defined in FIG. 44 and the reliability of awhole group of the directions L3 and L4 is obtained by the processing ofstep S204, and by comparing its magnitude, it is obtained toward whichof the upside and the downside it is slanted with respect to thehorizontal direction, and the direction having the highest reliabilityis selected from the group indicating the reliability tendency.

At step S206, the direction selecting unit 126 determines whether or notthere are a plurality of directions showing the highest reliability. Forexample, if there are a plurality of such directions, at step S207, froma plurality of the directions selected having the highest reliability,the direction closest to the horizontal direction is selected. On theother hand, if there are no plurality of directions having the highestreliability, the processing of the step S207 is skipped, whereby adirection selected by the processing of the step S204 or step S205 isselected as it is. That is, in the event that a plurality of directionsshares a similar degree of reliability, the direction closest to thehorizontal direction is selected.

At step S208, the direction selecting unit 126 determines whether or notexceptional conditions are applied. Namely, if any of the followingequations from (29) to (31) is satisfied, the direction selecting unit126 determines that it is an exceptional case and selects the horizontaldirection (direction L2 in FIG. 44) at the step S119.Population_(—) LI(I=(N−1)/2)−Population(Best_Dir)≧−1  (29)Tendency(X,Y)<(PM)/3  (30)Total_Population(X,Y)<(PM)/3  (31)where Population_LI(I=(N−1)/2) is reliability in the horizontaldirection and Population(Best_Dir) is the reliability of the directionselected in the processing of the steps from S201 to S207. If theBalance function is positive, Tendency (X,Y) shows Σ(I=(N+1)/2, N−1)(Population (LI)), whereas if it is negative, it shows Σ(I=0,(N−3)/2(Population (LI)). Namely, that is the sum of reliability of thehigh reliability groups when the positions of the right ends of arrowsindicating directions are divided into the upside and downside groups inthe horizontal direction. Total_Population(X,Y) is the sum ofreliability if the remarked pixel is (X,Y).

Namely, if the equation (29) is satisfied, it means that the reliabilityin the horizontal direction is higher than the reliability of thedirection selected in the processing from the steps S201 to S207,therefore, selection of the reliability in the horizontal directionbecomes the selection of the higher reliability direction. Further, ifthe equation (30) and the equation (31) are satisfied, the sum of thereliability of the groups having high reliability becomes smaller than apredetermined threshold of (PM)/3, so that the horizontal direction isselected upon deciding that no pixels of comparable accuracy areavailable as a whole. Alternatively, a different value from thethreshold of (PM)/3 may also be set.

At step S210, the direction selecting unit 126 outputs information onthe selected direction to the slant interpolating unit 128.

Now, we return to description of a flowchart in FIG. 40.

At step S183, the linear interpolating unit 127 obtains the averagepixel value between the pixels present at the left and at the right onthe horizontal direction relative to the remarked pixel as the linearinterpolated pixel and outputs the average pixel value to thecompositing unit 130, while, at the same time, the slant interpolatingunit 128 outputs the average pixel value between the pixels present onthe selected direction inputted by the direction selecting unit 126 asthe value of the slant interpolated pixel, and outputs to thecompositing unit.

At step S184, the slant weighting unit 129 sets a weight“weight_slant(X,Y)” in the slant direction of the remarked pixel (X,Y)as shown in the following equation (32) and outputs it to thecompositing unit 130.weight_slant(X,Y)=ABS(Balance(X,Y))/Total_population(X,Y) (or,weight_slant(X,Y)=ABS(Tendency(X,Y))/Total_population(X,Y))  (32)

Namely, a weight in the slant direction is set as a ratio of theabsolute value of the Balance function (or the Tendency function) to thetotal reliability.

At step S185, the compositing unit 130 calculates the following equation(33), weights the linear interpolated pixel inputted by the linearinterpolating unit 127 and the slant interpolated pixel for composition,and outputs the results as the interpolated pixel. $\begin{matrix}{{{V\_ buffer}\left( {X,Y} \right)} = {{\left( {1 - {{weight\_ slant}\left( {X,Y} \right)}} \right) \times \left( {{v\text{-}{{buffer}\left( {{X - 1},Y} \right)}} + {v\text{-}{{buffer}\left( {{X + 1},Y} \right)}}} \right)} + {{weight\_ slant}\left( {X,Y} \right) \times \left( {{v\text{-}{{buffer}\left( {{X - 1},{Y + {Best\_ Dir} - {\left( {N - 1} \right)/2}}} \right)}} + {v\text{-}{{buffer}\left( {{X + 1},{{Y\text{-}{Best\_ Dir}} - {\left( {N - 1} \right)/2}}} \right)}}} \right.}}} & (33)\end{matrix}$where v-buffer(X−1,Y) and v-buffer(X+1,Y) are pixels present at the leftand the right of the remarked pixel, and h-buffer(X−1,Y+Best_Dir−(N−1)/2)+h-buffer(X−1, Y−Best_Dir−(N−1)/2) are pixels presenton a diagonal line in the selected direction as viewed from the remarkedpixel and present on the left column and the right column.

In other words, because the weight on the linear interpolated pixel maybe expressed as (1-weight_slant(X,Y)), the pixel value obtained by thelinear interpolation is multiplied by a weight relating to the linearinterpolation (1-weight_slant(X,Y)), and further multiplied by a weightrelating to the slant interpolated pixel weight_slant(X,Y), and thelinear sum is obtained to produce the final interpolated pixel, thusmaking it possible to generate an accurate interpolated pixel since theinterpolation in the horizontal and slant directions is composed in goodbalance with their weights.

Similar processing is repeated to obtain each pixel of the individualunknown lines of the V buffer 51.

FIG. 45 is a conceptual representation of the above processing of thecase 2. As shown above thereby, if the X column of the V buffer 51 is ina predetermined relationship with a predetermined column of the virtualhorizontal twofold enlarged image 2X_image, data generated by directioninterpolation processing of the n column and n+1 column of the H buffer31 is stored in the 2X buffer 61. And the data stored therein is copied(stored) onto the X column of the V buffer 51.

Next, the case 3 processing to the V buffer at the step S152 of FIG. 37will be described with reference to a flowchart of FIG. 46.

This refers to a case of 2n<2X_column<2n+1 or 2n−1<2X_column<2n, thatis, if the value of the column X in the V buffer 51 does not correspondto neither of the column 2X_column of the virtual horizontal twofoldenlarged image 2X_image and also does not correspond to any of thecolumns of the H buffer 31.

In this case, at step S221, it is determined whether or not the value of2X_column is greater than 2n and smaller than 2n+1. If the value of2X_column is greater than 2n and smaller than 2n+1, the X_column of theV buffer 51 is generated from the 2n+1 column and 2n column of thevirtual horizontal twofold enlarged image 2X_image.

Now, in this case, at step S222, the high-speed horizontal up-samplingprocessing unit 15 calculates the 2n+1 column of the virtual horizontaltwofold enlarged image 2X_image by using its adjacent upper 2n columnand lower 2n+2 column (the n column and the n+1 column in the H buffer31) through processing from the steps S171 to S185 as shown in the case2 flowchart in FIG. 40. Since the result of calculation at the step S222may be used for performing the next n+1 column calculation in the Vbuffer 51, it is stored in the 2X buffer 61 at step S223.

Further, at step S224, from the 2n+1 column (the value stored in the 2Xbuffer 61) calculated at the step S222 and the 2n column of the virtualhorizontal twofold enlarged image 2X_image (n column of the H buffer31), the X column of the V buffer 51 is calculated using the followingequation, the result being stored in the X column of the V buffer 51.V_buffer(X,Y)=(2X_column−2n)×2X−buffer(X)+(2n+1−2X_column)×I_image  (34)

On the other hand, at the step S221, if it is not determined that the 2Xcolumn is greater than the 2n and smaller than the 2n+1 (that is, if itis determined that the 2X column is greater than the 2n−1 and smallerthan the 2n), the X column of the V buffer 51 is generated from the 2n−1column and the 2n column of the virtual horizontal twofold enlargedimage 2X_image. The 2n−1 column is calculated if a preceding column inthe V buffer 51 is obtained, and it may be already stored in the 2Xbuffer 61. Therefore, at step S225, it is determined whether or not the2n−1 column is already stored in the 2X buffer 61, and if it is stored,at step S228, the 2n−1 column data is fetched from the X buffer 61.

Now, at the step S225, if it is determined that the 2n−1 column data isnot stored in the 2X buffer 61 yet, the process goes to step S226 wherethere is performed the processing to calculate the 2n−1 column of thevirtual horizontal twofold enlarged image 2X_image by using the upper2n−2 column and the lower 2n column (the n−1 column and the n column inthe H buffer 31) through processing from the steps S171 to S185 as shownin a case 2 flowchart in FIG. 40. Since the value of the 2n−1 columncalculated at the step S226 may be used for calculating the next X+1column in the V buffer 51 at a step 227, it is stored in the 2X buffer61.

After the processing at the step S227 or step S228, the process moves tostep S229 where, from the 2n−1 column and the 2n column of the virtualhorizontal twofold enlarged image 2X_image (the n column of the H buffer31)), the X column of the V buffer 51 is interpolated according to thefollowing equation.V-buffer(X,Y)=(2n−2X_column)×2X−buffer(Y)+(2X_column−(2n−1))×I_image(n,Y)  (35)

This processing is carried out while performing an increment of the Yvalue as long as the value remains to be smaller than In_height×alpha_Zfrom Y=0.

To obtain each pixel of the individual unknown columns of the V buffer51, the similar processing is repeatedly executed at coordinates (X,Y+N/2) meeting the conditions of (−1<Y<alpha_Z×In_height−N+1) and(−1<Y<alpha_Z×In_(—width−)1).

In this way, in the case 3 processing, the weighting interpolation iscarried out by using the 2n column and the 2n+1 column or the 2n−1column and the 2n column of the virtual horizontal twofold enlargedimage 2X_image.

A schematic representation of the processing to show the case 3 in FIG.46 as mentioned above is shown in FIG. 47. If the value of column X inthe V buffer 51 is in a predetermined relationship with the column ofthe virtual horizontal twofold enlarged image 2X_image, data of the 2n+1column or 2n−1 column is generated by direction interpolation processingfrom the n column of the original I_image and the n+1 column and storedin the 2X buffer 61. Then from the value stored in the 2X buffer 61 anddata on the 2n column of the virtual horizontal twofold enlarged image2X_image, data of the X column of the V buffer 51 is subjected toweighting interpolation.

As mentioned above, if it is determined at the step S21 that the setmode is an image mode, processing from the step S22 to the step S25 iscarried out, whereas if it is determined at the step S21 that the setmode is not the image mode (if a loose connection image such as acomputer icon and a word processor's font is processed), prior to theexecution of processing from the step S22 to the step S25, edgeconnector processing is carried out at the step S26. Details of the edgeconnector processing are shown in FIG. 48 and FIG. 49. The edgeconnector processing is carried out by the edge connector processingunit 11.

First, at step S241, corresponding to a predetermined pixel (X,Y), 2×2pieces of pixels are cut out. And at step S242 and step S243, respectiveright diagonal energy and left diagonal energy are calculated. The rightdiagonal energy is obtained by subtracting the lower left pixel from theupper right pixel from the 2×2 pieces of pixels, while the left diagonalenergy is obtained by subtracting the lower left pixel from the upperright pixel.

For example, if a pixel (X,Y) is assumed to be a pixel 0 in FIG. 50A,the right diagonal energy may be obtained, as shown in FIG. 50A, bysubtracting the value of a pixel 2 from a pixel 1, while the leftdiagonal energy may be obtained, as shown in FIG. 50B, by subtractingthe value of a pixel 3 from the pixel 0.

Next, it is determined at step S244 whether or not the pixel value onthe left diagonal line is smaller than the pixel value on the rightdiagonal line. In the case of FIGS. 50A and B, it is determined whetheror not the pixel values of the pixel 0 and the pixel 3 are smaller thanthe pixel values of the pixel 1 and the pixel 2.

If it is determined at the step S244 that the pixel value on the leftdiagonal line is smaller than the pixel value on the right diagonalline, the process goes to step S245 where it is determined whether ornot the left diagonal energy calculated at the step S143 is smaller thanthe predetermined threshold. If the left diagonal energy is smaller thanthe threshold, the process moves to step S246 where it is determinedwhether or not the pixel 2 is smaller than the pixel 1. If the pixel 2is smaller than the pixel 1, the processing is carried out at step S247to make the pixel 1 as the average value of the pixel 0 and the pixel 3.If the pixel 2 is not smaller than the pixel 1 (equal to or greater) atthe step S246, the process goes to step S248 where processing is carriedout to make the pixel 2 as an average value of the pixel 0 and the pixel3.

FIG. 51A shows a case where as a result of processing at the step S247,the value of pixel 1 is made to be an average value of the pixel 0 andthe pixel 3.

If it is determined at the step S245 that the left diagonal energy isequal to or greater than the threshold, the processing from the stepS246 to the step 248 will be skipped.

If it is determined at the step S244 that the pixel value on the leftdiagonal line is not smaller than (if it is determined to equal to orgreater) than the pixel value on the right diagonal line, the processmoves to step S249 where it is determined whether or not the rightdiagonal energy calculated at the step S242 is smaller than thepredetermined threshold. If the right diagonal energy is smaller thanthe threshold. The processing goes to step S250 where it is determinedwhether or not the pixel 3 is smaller than the pixel 0. If the pixel 3is smaller than the pixel 0, processing is carried out at step S251 tomake the pixel 0 as the average value of the pixel 1 and the pixel 3. Ifthe pixel 3 is not smaller than the pixel 0 (equal to or greater) atstep S250, the process goes to step S252 where processing is carried outto make the pixel 3 as the average value of the pixel 1 and the pixel 2.

FIG. 51B shows an example if the pixel 3 is made an average valuebetween the pixel 1 and the pixel 2 through the processing at step S252.

If it is determined at the step S249 that the right diagonal energy isnot smaller than the threshold, the processing from the step S250 to thestep S252 is skipped.

It is possible to strengthen an edge structure by making an edge havinga loose connection such as icon and font thicker through theabove-mentioned edge connector processing, thereby making it possible toprevent the following thing, which may destroy the edge connectivity,being happen. As shown in FIGS. 50A and B, if there is a looseconnection having an edge locally only on two diagonal lines, there maycause obvious error in recognizing the edge direction through edgedirection calculation processing at the step S95 of FIG. 24 or the edgedirection calculation processing at the step S175 of FIG. 40 or thelike.

Next, the zoom processing at the step S8 of FIG. 2 will be described.The zoom processing is described in detail in a flowchart of FIG. 52.Processing from step S271 to step S275 is basically similar to that ofthe high-speed zoom processing from the step 21 to the step S25 in FIG.11.

Since the edge connector processing at step S276 of FIG. 52, theone-dimensional vertical image refresh processing at step S272, and theone-dimensional horizontal image refresh processing at step S273 in FIG.52 are respectively similar processing to the one-dimensional verticalimage refresh processing at the step S22 and the one-dimensionalhorizontal image refresh processing at the step S23 in FIG. 11,description thereof will be omitted. Only the vertical up-sampling atstep S274 and the horizontal up-sampling processing at step S275 will bedescribed as follows.

First, the vertical up-sampling processing at the step S274 will bedescribed in detail with reference to a flowchart in FIG. 53. Thisprocessing is carried out by the vertical up-sampling processing unit13.

First at step S291, the vertical up-sampler 141 creates an H buffer 31,its size being In_width×(2×In_height). Next, at step S292, the verticalup-sampler 141, as shown in FIG. 54, copies the Y line of the originalI_image onto the line 2Y of the H buffer 31. The last line of theoriginal I_image is copied onto the last line of the H buffer 31.

Next, at step S293, the edge detecting unit 122 of the horizontaldirection interpolating unit 142 extracts N pixels of an upper line“up_line” and a lower line “down_line” in the original I_image. Thecentral coordinate of the upper line “up_line” is (X+N/2, n) while thecentral coordinates of the lower line “down_line” is (X+N/2, n+1).

Next, at step S294, the edge detecting unit 122 calculates local energyE(N) from the above-mentioned equation (11).

Next, at step S295, the edge detecting unit 122 determines whether ornot the local energy E(N) is greater than a predetermined threshold T.If the local energy E(N) is equal to or smaller than the threshold T,such area is considered as a flat, low energy area including no edges.In this case, it is not necessary to calculate the direction of apotential edge. Consequently, the process proceeds to step S296, and thedirection interpolating unit 131 calculates an average value of anadjacent up line central pixel “ab_line (N/2)” and an adjacent down linecentral pixel “down_line (N/2)” as pixel data of coordinate (X+N/2,Y) inthe H buffer 31 and stores it in the coordinate (X+N/2, Y) of the Hbuffer 31, while, outputting directional information indicating thehorizontal direction to the reliability ranking unit 124 and thedirectional distribution generating unit 125. Further, the reliabilityranking unit 124 outputs 0, which indicates low reliability concerningthis particular interpolated pixel, to the directional distributiongenerating unit 125. Namely, at step S296, a standard linearinterpolation processing is carried out based on the above-mentionedequation (12).

If the value of the local energy E(N) is determined to be greater thanthe threshold T at the step S295, such area is considered as a highenergy area including potential edges. In this case, processing tocalculate an edge direction experimentally is carried out at step S297.Specifically, the following calculation is continued from x=N−1 until xbecomes greater than −1.Energy=ABS(up_line(N−x−1)−down_line(x))  (36)

Of the energy values calculated by the above equation (36), the smallestvalue is selected, and the direction of diagonal lines to which the twopixels correspond is considered as the direction of a local edge.

If an edge direction is detected by the processing of the step S297,further at step S298, the direction interpolating unit 131 carries outinterpolation processing (direction interpolation processing to becarried out) by using pixels of the detected edge direction. It meansthat this direction interpolation processing, based on the pixel valuesof two pixels corresponding to the edge direction, interpolates pixelvalues of pixels disposed therebetween.

Next, the process goes to step S299 where the reliability ranking unit124 carries out structural collector processing. The structuralcollector processing is processing to check consistency of a renewedlocal structure (a pixel generated by direction interpolation processingof the step S298 and the pixels thereon and thereunder) by analyzing arelationship between a pixel interpolated on the coordinate (X+N/2,Y)and its adjacent horizontal pixel, that is, between the coordinateup_line(N/2) and the coordinate down_line(N/2).

Namely, in the structural collector processing, processing to subtractpixels that are renewed from the central pixel on the upper line iscarried out, and further processing to subtract the central pixel on thelower line from the renewed pixels is carried out. Moreover, twosubtraction results thus obtained are multiplied to produce a valueV(N/2) expressing a change in the horizontal direction. That is, at thestep S299, calculation shown in the following equation is performed.V(N/2)=(up_line(N/2)−H−buffer(X+N/2,Y))×(H−buffer(X+N/2,Y)−down_line(N/2))  (37)

Next, at step S300, the reliability ranking unit 124 determines, basedon the result of calculation at the step S299, whether or not there isconsistency of the renewed local structure. This determination is madebased on whether or not the value V(N/2) calculated by the aboveequation (37) is positive. If the value V(N/2) is positive, consistencyis considered to be present, and at step S301, the reliability rankingunit 124 sets the reliability of the interpolated pixel to 1 and outputsit to the directional distribution generating unit 125.

On the other hand, if the value V(N/2) is determined to be negative atthe step S300, consistency is considered to be not present. Namely,judging of the local direction is incorrect, and the pixel valuegenerated at the step S237 is determined to be improper. In this case,the local edge direction is considered beyond judging, and thereliability ranking unit 124 sets the reliability of the interpolatedpixel to 0 and outputs it to the directional distribution generatingunit 125.

At step S303, it is determined whether or not all the pixels due to beinterpolated in the remarked area associated with the remarked pixel areinterpolated. If it is determined that all the pixels due to beinterpolated in the remarked A area are not interpolated, the processingreturns to the step S291 where the processing from the steps S291 toS303 is repeated until all pixels due to be interpolated areinterpolated; and if it is determined in step S303 that all the pixelsdue to be interpolated are interpolated, the process goes to step S304.The remarked area associated with the remarked pixel means, for example,the interpolated pixels in the range of P(number of pixels)×M(lines)shown in FIG. 28, and direction selection processing is carried out atthe step S304. It should be noted that direction selection processing atthe step S304 is similar to the processing described at the step S102with reference to the flowchart of FIG. 24, hence, its description willbe omitted.

At step S305, the linear interpolating unit 127 obtains the averagepixel value between the pixels present above and below the horizontaldirection relative to the remarked pixel as the linear interpolatedpixel and outputs the average value to the compositing unit 130, while,at the same time, the slant interpolating unit 128 outputs to thecompositing unit an average pixel value between the pixels present onthe selected direction inputted by the direction selecting unit 126 asthe slant interpolated pixel value.

At step S306, the slant weighting unit 129 sets a slant weight“weight_slant(X,Y)” in the slant direction of the remarked pixel (X,Y)according to the above-mentioned equation (19) and outputs it to thecompositing unit 130.

At step S307, the compositing unit 105 calculates the above-mentionedequation (20), weights the linear interpolated pixel inputted by thelinear interpolating unit 127 and the slant interpolated pixel forcomposition, and outputs the result as the interpolated pixel.

FIG. 55 describes in detail horizontal up-sampling processing at thestep S275 of FIG. 52. This processing is carried out by the horizontalup-sampling processing unit 15.

First at step S321, the horizontal up-sampler 141 creates a V buffer 51,its size being 2×In_width×2×In_height. At step S322, the horizontalup-sampler 141 copies an X column of the H buffer 31 onto a column 2X ofthe V buffer 51. The X value is greater than −1 and smaller thanIn_width.

Next, at step S323, the edge detecting unit 122 of the verticaldirection interpolating unit 162 extracts a left column “left_column”and a right column “right_column” of the H buffer 31. The centralcoordinate of the left column “left_column” is (n, X+N/2) while thecentral coordinate of the right column “right column” is (n+1,X+N/2).

Next, at step S324, the edge detecting unit 122 obtains local energyE(N) by subtracting pixels of the right column “right_column” disposedon the diagonal line from individual pixels of the left column“left_column”, and calculates a sum of absolute values. Namely, theabove-mentioned equation (24) is used for calculation in thisprocessing.

Next, at step S325, it is determined whether or not the local energyE(N) is greater than a predetermined threshold T. If the local energyE(N) is equal to or smaller than the threshold T, such area isconsidered as a flat, low energy area including no edges. In this case,it is not necessary to calculate the direction of a potential edge.Consequently, the process proceeds to step S326, and standard linearinterpolation processing is carried out. Namely, as shown in theabove-mentioned equation (25), a pixel value of a new pixel (X+N/2, Y)is calculated from an average value of an adjacent left column centralpixel “left_column(N/2)” and an adjacent right column central pixel“right column (N/2)”.

At step S325, if it is determined that the energy E(N) is greater thanthe threshold T, such area is considered to be a high energy areaincluding edges potentially. In this case, the area is considered as ahigh energy area including edges, and the process goes to step S327where edge direction calculation processing is carried out.Energy=ABS(left_column(N−x−1)−right_column(x))  (38)

The above calculation performs a sequential decrement of x from x=N−1and continues as long as x is greater than −1.

A direction of a diagonal line of a pixel corresponding to the leastvalue of the calculated energy is determined to be a local edgedirection.

In the processing of step S327, if the edge direction is determined,further at step S328, the direction interpolating unit 131 carries outinterpolation processing (direction interpolation processing to becarried out) by calculating an average value of two pixels in the edgedirection determined at the step S327.

Next, at step S329, structural collector processing is carried out.Namely, by analyzing a relationship among a pixel interpolated onto thecoordinates (X,Y+N/2) in the V buffer 51, a pixel of the coordinateleft_column (N/2) which is a proximity pixel in the horizontal directionthereof, and a pixel of the coordinate right_column (N/2), theprocessing to check the consistency of the local structure is carriedout. Consequently, according to the following equation, the interpolatedpixel is subtracted from the central pixel of the left column, and thecentral pixel of the right column is subtracted from the interpolatedpixel to obtain two results of subtraction, and these two results ofsubtraction are multiplied, thereby calculating a value H(N/2)indicating a change in the horizontal direction.H(N/2)=(left_column(N/2)−V−buffer(X+N/2,Y))×(V−buffer(X+N/2,Y)−right_column(N/2))  (39)

It is determined at step S330, based on the value (H(N/2) calculated atthe step S329, whether or not there is consistency in the interpolatedlocal structure. Specifically, it is determined whether the value H(N/2)is positive or negative. If the value H(N/2) is positive, the pixelobtained in the direction interpolation processing of the step S328 isconsidered correct (consistent), and at step S331, the reliability ofthe interpolated pixel is set to 1 and outputted to the directionaldistribution generating unit 125.

If the value H(N/2) is determined to be negative (inconsistent, that is,if it is determined that the pixel value generated in the directioninterpolation processing of the step S328 is not proper) at the stepS330, the process goes to step S180, and the reliability ranking unit124 set the reliability of the interpolated pixel to 0 and outputs it tothe directional distribution generating unit 125.

It is determined at step S333 whether or not all the pixels due to beinterpolated in the remarked area associated with the remarked pixel areinterpolated. If it is determined that all the pixels due to beinterpolated in the remarked A area are not interpolated, the processingreturns to the step S321 where the processing from the steps S321 toS333 is repeated until all the pixels due to be interpolated areinterpolated; and if it is determined at the step S333 that all thepixels due to be interpolated in the remarked A area are interpolated,the process goes to step S334.

In this context, the remarked area associated with the remarked pixelmeans, for example, the pixels due to be interpolated in the range ofM(number of pixels)×P(lines) as shown in FIG. 42, and directionselection processing is carried out at the step S334. It should be notedthat since the direction selection processing at the step S334 issimilar to the processing at the step S182 described with reference tothe flowchart of FIG. 40, its description will be omitted.

At step S335, the linear interpolating unit 127 obtains an average pixelvalue between the pixels present at the left and the right on thehorizontal direction relative to the remarked pixel as the linearinterpolated pixel and outputs the average pixel value to thecompositing unit 130, while, at the same time, the slant interpolatingunit 128 outputs an average pixel value between the pixels present onthe selected direction inputted by the direction selecting unit 126 asthe slant interpolated pixel value to the compositing unit.

At step S336, the slant weighting unit-129 sets a weight“weight_slant(X,Y)” in the slant direction of the remarked pixel (X,Y)as shown in the above-mentioned equation (19) and outputs it to thecompositing unit 130.

At step S337, the compositing unit 130 calculates the above-mentionedequation (20), weights the linear interpolated pixel inputted by thelinear interpolating unit 127 and the slant interpolated pixel forcomposition, and outputs the results as the interpolated pixel.

FIG. 56 is a conceptual representation of horizontal up-sampling in FIG.55 mentioned above. As shown in the drawing, data on the X column of theH buffer 31 is copied onto the 2X column of the V buffer 51, and thecolumn data in between is interpolated.

As mentioned above, it is possible to change the resolution of an imageby any magnification. In this case, for example, if enlarging the image6 times, the zoom processing is repeated 2 times, and after obtaining a4-time enlarged image, a 3/2 times high-speed zoom processing may becarried out; or the zoom processing is repeated 3 times, and afterobtaining an 8-time enlarged image, a 3/4 linear reduction processingmay be carried out.

Further, as explained flowcharts of FIG. 12 and FIG. 16, it is possibleto separate processing contents and apply appropriate processing foreach separated content. The one-dimensional vertical image refreshprocessing and the one-dimensional horizontal image refresh processingrecognize the edges from the texture, and perform the filter processingand the clipping processing to the edges, while perform only the filterprocessing to the texture.

Still further, as mentioned above and shown in FIG. 10 or FIG. 52, inthe high-speed zoom processing or the zoom processing, the execution ofthe one-dimensional vertical image refresh processing and theone-dimensional horizontal image refresh processing prior to performingthe vertical up-sampling processing and the horizontal up-samplingprocessing makes it possible for the one-dimensional vertical imagerefresh processing and the one-dimensional horizontal image refreshprocessing to be accomplished only by carrying out processing with thenumber of pixels of the original image before the number of pixels isexpanded. Accordingly, it is not necessary to correspond the number offilter taps of the one-dimensional vertical filter and theone-dimensional horizontal filter as shown in FIG. 14, FIG. 15, FIG. 18,and FIG. 19 to the number of pixels after the expansion processing,thereby enabling the amount of calculation processing to be reduced tothat extent. Realization of higher speed processing is thus madepossible.

Furthermore, since the coefficient α of the one-dimensional verticalfilter and the one-dimensional horizontal filer dynamically correspondsto changes in the values of the vertical central pixel energy EV and thehorizontal central pixel energy EH, it becomes possible to appropriatelychange the intensity of the enhancement processing for the edge ortexture.

Moreover, as described with reference to flowcharts in FIG. 24, FIG. 40,FIG. 53, and FIG. 55, by using the directional distribution, thedirection to be used in the direction interpolation may be accuratelydetermined. In addition, a pixel value obtained by the slantinterpolation determined by the directional distribution and a pixelvalue processed with the linear interpolation are subjected to theweighting based on the directional distribution for composition and thelinear summation thereof to generate the interpolated pixel, therebyenabling the pixel value to be accurately interpolated.

As a result, it is possible to suppress errors observed in the imageproduced by converting the image resolution, so that a clear convertedimage may be generated. FIG. 57 shows an image subjected to resolutionconversion according to the conventional technique (technique utilizingan invention of which application is filed as Japanese PatentApplication 2001-201729). FIG. 58 is an image whose resolution has beenconverted by using the technique of the present invention.

The two figures are images both showing two uniform curves. The image inFIG. 58 has the thickness of two curves more uniformly expressed thanthe image of FIG. 57, thus generating a clearer image. Namely, accordingto the present invention, since the errors due to resolution conversionare suppressed, images of clear resolution conversion may be generated.

It should be noted that in the above-mentioned examples, description hasbeen provided with respect to the cases of expanding respectively in thehorizontal direction and in the vertical direction. However, it may beso arranged that expansion is made only in one of the directions. Atthis time, processing to expand only in the vertical direction will bethe same processing as so-called IP conversion where a conversion ismade from an interlace image to a progressive image. In other words, thepresent invention is also applicable to the IP conversion. In actualprocessing, it may be set as processing if the expansion rate of eitherthe horizontal direction or the vertical direction in theabove-mentioned processing is set to 1, or the processing may berealized by skipping either processing in the horizontal direction orvertical direction. Accordingly, description thereof is omitted.

FIG. 59 shows a hardware configuration of the image processing apparatus2 having functional blocks as shown in FIG. 1. A CPU (Central ProcessingUnit) 311 executes various processing according to programs stored in aROM (Read Only Memory) 312 or a program loaded from a storage section318 to a RAM (Random Access Memory) 313. Data necessary for the CPU 311to execute various processing and the like may be stored, as necessary,in the RAM 313.

The CPU 311, the ROM 312, and the RAM 313 are mutually connected via abus 314. Further, to the bus 314 is connected an input/output interface315.

To the input/output interface 315, there are connected an input section316 including a keyboard, mouse and the like, a display including a CRT,an LCD and the like, an output section 317 including a speaker and thelike, a storage section 318 including a hard disc and the like, and acommunications section 319 including a modem, a terminal adapter and thelike. The communications section 319 performs communications processingvia a network as represented by the Internet and the like.

The input/output interface 315 may be connected with a drive 320, asnecessary, so that a magnetic disc 331, an optical disc 332, amagneto-optical disc 333 or a semiconductor memory 334 is properlyconnected thereto, a computer program read therefrom being installed inthe storage section 318, as necessary.

A series of processing mentioned above may be executed by means ofhardware equipment but may also be executed by software. If executing aseries of processing by software, programs constituting such a softwareare installed into a computer, which may be built-in to hardware ofexclusive use, or a general-purpose personal computer, which is capableof executing various functions. Such programs may be installed onto thecomputers from a network and a recording medium.

The recording medium as shown in FIG. 59 is constituted by not only apackage medium including the magnetic disc 331 (including a flexibledisc), the optical disc 332 (CD-ROM (Compact Disc-Read Only Memory)), aDVD (including a Digital Versatile Disc)), the magneto-optical disc 333(including an MD(Mini-Disc)), the semiconductor memory 334 or the like,in which a program is recorded and which is distributed to the user toprovide the program separately from the computer, but also a ROM 312 inwhich a program is recorded and which is provided to the user as beingbuilt therein, and a hard disc as included in the storage section 318.

It is to be noted that in the present specification, the stepsdescribing the program recorded on a recording medium naturallyencompass not only processing steps to be carried out in time series inthe described order, but also processing steps that are carried out inparallel or individually and not necessarily in the time series asdescribed above.

As mentioned above, the apparatus and the method, and the program forimage processing according to the present invention make it possible tohave an accurate grasp of a direction of an edge portion including apixel to be interpolated, and, further, to generate a more accurateinterpolated pixel.

It should be understood by those skilled in the art that variousmodifications, combinations, sub-combinations and alterations may occurdepending on design requirements and other factors insofar as they arewithin the scope of the appended claims or the equivalents thereof.

1. An image processing method for converting a spatial resolution of anoriginal image so as to respectively multiply Z times either in avertical direction or a horizontal direction or both directions, theimage processing method comprising: calculating a central pixel energyat a pixel position of interest, wherein the central pixel energy iscalculated in the horizontal or vertical direction of a predeterminedpixel of the original image from pixel values of adjacent pixels presentin a proximity of the pixel; enhancing an edge based on the centralpixel energy calculated by the energy calculating step; detecting adirection of the edge enhanced by the edge enhancement step;interpolating a linear interpolated pixel at the pixel position ofinterest by linear interpolation; interpolating a selected directioninterpolated pixel in a selected direction at the pixel position ofinterest based on the edge direction detected by the edge directiondetecting step, and interpolating a composition interpolated pixel bycompositing the linear interpolated pixel and the selected directioninterpolated pixel.